﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HsCommX;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Configuration;

namespace StockMonitor.Helper
{
    /// <summary>
    /// 恒生股票交易接口封装程序（通过代码生成器生成）
    /// </summary>
    /// <remarks>
    /// 代码编写：<author>LANCEZHANG-PC\zhangxl</author><br/>
    /// 编写时间：<datetime>2012-10-16 6:03 PM</datetime>
    /// </remarks>
    public class HsGateway : IDisposable
    {
        private Comm objComm = new HsCommX.Comm();
        private ClsNetInfo objNet;
        private static DateTime dtMark = new DateTime(2010, 1, 1);

        public static int op_branch_no = int.Parse(ConfigurationManager.AppSettings["op_branch_no"]); //210053;
        public static int branch_no = int.Parse(ConfigurationManager.AppSettings["branch_no"]); //2100;

        public static string version = ConfigurationManager.AppSettings["version"]; //"1";
        public static string op_station = ConfigurationManager.AppSettings["op_station"]; // @"C8-3A-35-D7-02-E1";
        public static string op_entrust_way = ConfigurationManager.AppSettings["op_entrust_way"]; //"0";

        #region Ctor.

        public HsGateway()
        {
            this.objComm.Create();
            this.objNet = new ClsNetInfo();
        }

        ~HsGateway()
        {
        }

        public void Dispose()
        {
            if (this.objComm == null)
                return;
            this.objComm.DisConnect();
            this.objComm = null;
        }

        #endregion

        #region Connect/DisConnect

        public bool Connect()
        {
            //this.objComm.SetConnect();
            //return (0 == this.objComm.Connect());
            return Connect("Configs\\prmNetwork.ini");
        }

        public bool Connect(string file_name)
        {
            if (this.objComm == null)
            {
                this.objComm = new HsCommX.Comm();
                this.objComm.Create();
            }

            this.objNet.initFromFile(file_name);
            ClsNetInfo objNet = this.objNet;
            if (0 == this.objComm.ConnectX(objNet.Protocol, objNet.Address, objNet.Port, objNet.KeyCiper, objNet.Key, objNet.KeyLen))
            {
                return true;
            }
            objNet = null;
            return false;
        }

        public void DisConnect()
        {
            if (0 == this.objComm.Connection)
            {
                this.objComm.DisConnect();
                this.objComm.Free();
            }
        }

        #endregion

        #region Exception
        public enum HsErrorCode : int
        {
            委托已受理待确认 = -73,
            客户登陆受限 = -71,
            密码长度不足 = -68,
            未作指定交易 = -67,
            帐户状态错 = -66,
            股票停牌 = -65,
            ///（包括该股民无权进行此类股票的委托）
            /// </summary>
            无此权限 = -64,
            密码错误 = -63,
            超出限制 = -62,
            /// <summary>
            ///（包括其它所有错误）
            /// </summary>
            其它错误 = -61,
            /// <summary>
            /// 
            /// </summary>
            没有数据 = -60,
            /// <summary>
            /// 
            /// </summary>
            已闭市 = -59,
            /// <summary>
            /// 
            /// </summary>
            股票不足 = -58,
            /// <summary>
            ///（如果资金够委托一笔以上，则不报此错，返回成功）
            ///（包含转帐后可取金额低于下限）
            /// </summary>
            资金不足 = -57,
            /// <summary>
            /// 
            /// </summary>
            价格错误 = -56,
            /// <summary>
            /// 
            /// </summary>
            数量错误 = -55,
            /// <summary>
            /// 
            ///（包含其他错误）
            /// </summary>
            不能撤单 = -54,
            /// <summary>
            ///（包含此委托不是该股民的）
            /// </summary>
            无此委托 = -53,
            /// <summary>
            ///（此错误可不作判断）
            /// </summary>
            无此股票 = -52,
            /// <summary>
            ///（包含银行号输入错误，此错误可不作判断）
            /// </summary>
            无此帐户 = -51,
            /// <summary>
            /// 需提示，仍可登录
            /// </summary>
            交易密码到期未修改 = -42,
            /// <summary>
            /// 需提示，仍可登录
            /// </summary>
            资金密码到期未修改 = -41,
        }

        [global::System.Serializable]
        public class HsCommException : Exception
        {
            public HsErrorCode ErrorInfo { get; set; }

            public HsCommException() { }
            public HsCommException(string message) : base(message) { }
            public HsCommException(string message, Exception inner) : base(message, inner) { }
            protected HsCommException(
              System.Runtime.Serialization.SerializationInfo info,
              System.Runtime.Serialization.StreamingContext context)
                : base(info, context) { }

            public HsCommException(string message, int ErrorNo)
            {
                this.ErrorInfo = (HsErrorCode)ErrorNo;
            }
        }

        #endregion

        #region Utilities

        public static long GetSendId(int funId)
        {
            return (DateTime.Now - dtMark).Ticks * 1000 + funId;
        }

        #endregion

        #region Methods.
        /// <summary>
        /// F100 系统登录 的返回结果
        /// </summary>
        public class ResultF100
        {
            public ResultF100(Comm objComm)
            {
                init_date = Convert.ToInt32(objComm.FieldByName("init_date"));
                sys_status = objComm.FieldByName("sys_status");
                sys_status_name = objComm.FieldByName("sys_status_name");
            }
            /// <summary>
            /// 当前交易日期 
            /// </summary>
            public int init_date { get; set; }
            /// <summary>
            /// 系统状态 
            /// </summary>
            public string sys_status { get; set; }
            /// <summary>
            /// 系统状态说明 
            /// </summary>
            public string sys_status_name { get; set; }
        }

        ///<summary>
        ///功能号	100	版本号	3.7	更新日期	20090608
        ///功能名称	系统登录			结果集返回	N
        ///业务范围	公用			功能状态	公开
        ///功能描述	系统登录
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	登录失败
        ///修改记录
        ///</summary>
        public ResultF100 F100系统登录()
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 100);
            objComm.SetRange(3, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF100 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF100(objComm);
            }
            return result;

        }

        /// <summary>
        /// F101 查询数据字典 的返回结果
        /// </summary>
        public class ResultF101
        {
            public ResultF101(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                dict_entry = Convert.ToInt32(objComm.FieldByName("dict_entry"));
                subentry = objComm.FieldByName("subentry");
                dict_prompt = objComm.FieldByName("dict_prompt");
            }
            /// <summary>
            /// 分支代码 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 词典条目 
            /// </summary>
            public int dict_entry { get; set; }
            /// <summary>
            /// 词典子项 
            /// </summary>
            public string subentry { get; set; }
            /// <summary>
            /// 子项名称 
            /// </summary>
            public string dict_prompt { get; set; }
        }

        ///<summary>
        ///功能号	101	版本号	3.7	更新日期	20090608
        ///功能名称	查询数据字典			结果集返回	Y
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询数据字典
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	取数据词典错
        ///修改记录
        ///</summary>
        ///<param name="dict_entry">数据词典条目</param>
        ///<param name="subentry">数据词典子项，不输表示全部</param>
        public List<ResultF101> F101查询数据字典(int dict_entry, string subentry)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 101);
            objComm.SetRange(5, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("dict_entry");
            objComm.AddField("subentry");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(dict_entry.ToString());
            objComm.AddValue(subentry);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF101> result = new List<ResultF101>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF101(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F102 查询业务标志 的返回结果
        /// </summary>
        public class ResultF102
        {
            public ResultF102(Comm objComm)
            {
                business_flag = Convert.ToInt32(objComm.FieldByName("business_flag"));
                business_name = objComm.FieldByName("business_name");
            }
            /// <summary>
            /// 业务标志 
            /// </summary>
            public int business_flag { get; set; }
            /// <summary>
            /// 业务名称 
            /// </summary>
            public string business_name { get; set; }
        }

        ///<summary>
        ///功能号	102	版本号	3.7	更新日期	20090608
        ///功能名称	查询业务标志			结果集返回	Y
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询业务标志
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	取业务标志错
        ///修改记录
        ///</summary>
        ///<param name="business_flag">业务标志，0表示全部</param>
        public List<ResultF102> F102查询业务标志(int business_flag)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 102);
            objComm.SetRange(4, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("business_flag");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(business_flag.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF102> result = new List<ResultF102>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF102(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F103 取银行参数 的返回结果
        /// </summary>
        public class ResultF103
        {
            public ResultF103(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no "));
                bank_no = objComm.FieldByName("bank_no");
                bank_name = objComm.FieldByName("bank_name");
            }
            /// <summary>
            /// 分支代码 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 银行代码，应返回一位的银行号！ 
            /// </summary>
            public string bank_no { get; set; }
            /// <summary>
            /// 银行名称 
            /// </summary>
            public string bank_name { get; set; }
        }

        ///<summary>
        ///功能号	103	版本号	3.7	更新日期	20090608
        ///功能名称	取银行参数			结果集返回	Y
        ///业务范围	公用			功能状态	公开
        ///功能描述	取银行参数，周边传入外部银行号，根据配置文件找到内部银行，再取对应记录
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	取银行参数错
        ///修改记录
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="bank_no">银行代码，’’表示全部</param>
        public List<ResultF103> F103取银行参数(int branch_no, string bank_no)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 103);
            objComm.SetRange(5, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("bank_no");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(bank_no);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF103> result = new List<ResultF103>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF103(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F104 查询帐号分支号 的返回结果
        /// </summary>
        public class ResultF104
        {
            public ResultF104(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no "));
            }
            /// <summary>
            /// 分支代码 
            /// </summary>
            public int branch_no { get; set; }
        }

        ///<summary>
        ///功能号	104	版本号	3.7	更新日期	20090608
        ///功能名称	查询帐号分支号			结果集返回	N
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询帐号分支号
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	取客户网点错
        ///修改记录
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="input_content">输入方法，‘1’，‘2’，‘3’，4’，‘5’,‘6’分别表示account_content代表资金帐号，股东内码，和资金卡号，银行帐号，股东帐号，客户编号。</param>
        ///<param name="content_type">当input_content为‘4’，‘5’时，则content_type明确银行号和股东的市场类别，其它输入为‘0’</param>
        ///<param name="account_content">帐户号</param>
        public ResultF104 F104查询帐号分支号(int branch_no, string input_content, string content_type, string account_content)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 104);
            objComm.SetRange(7, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("input_content");
            objComm.AddField("content_type");
            objComm.AddField("account_content");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(input_content);
            objComm.AddValue(content_type);
            objComm.AddValue(account_content);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF104 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF104(objComm);
            }
            return result;

        }

        /// <summary>
        /// F105 查询股票市场 的返回结果
        /// </summary>
        public class ResultF105
        {
            public ResultF105(Comm objComm)
            {
                internal_code = objComm.FieldByName("internal_code");
                stock_code = objComm.FieldByName("stock_code");
                exchange_type = objComm.FieldByName("exchange_type");
                stock_name = objComm.FieldByName("stock_name");
                buy_unit = Convert.ToInt32(objComm.FieldByName("buy_unit"));
                price_step = Convert.ToInt32(objComm.FieldByName("price_step"));
                store_unit = Convert.ToInt32(objComm.FieldByName("store_unit"));
                up_price = Convert.ToDouble(objComm.FieldByName("up_price"));
                down_price = Convert.ToDouble(objComm.FieldByName("down_price"));
            }
            /// <summary>
            /// 证券内码 
            /// </summary>
            public string internal_code { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买入单位 
            /// </summary>
            public int buy_unit { get; set; }
            /// <summary>
            /// 最小价差 
            /// </summary>
            public int price_step { get; set; }
            /// <summary>
            /// 存放单位 
            /// </summary>
            public int store_unit { get; set; }
            /// <summary>
            /// 上限价 
            /// </summary>
            public double up_price { get; set; }
            /// <summary>
            /// 下限价 
            /// </summary>
            public double down_price { get; set; }
        }

        ///<summary>
        ///功能号	105	版本号	3.7	更新日期	20090608
        ///功能名称	查询股票市场			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询股票市场
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	取证券代码错
        ///修改记录	V3.7 20090608 张国强 增加输出参数store_unit, up_price和down_price，支持投资赢家
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="stock_code">证券代码</param>
        public List<ResultF105> F105查询股票市场(int branch_no, string stock_code)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 105);
            objComm.SetRange(5, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("stock_code");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(stock_code);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF105> result = new List<ResultF105>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF105(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F200 客户登录校验 的返回结果
        /// </summary>
        public class ResultF200
        {
            public ResultF200(Comm objComm)
            {
                content_type = objComm.FieldByName("content_type");
                account_content = objComm.FieldByName("account_content");
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                fund_account = Convert.ToInt32(objComm.FieldByName("fund_account"));
                online_time = Convert.ToInt32(objComm.FieldByName("online_time"));
                client_id = objComm.FieldByName("client_id");
                client_name = objComm.FieldByName("client_name");
                fundaccount_count = Convert.ToInt32(objComm.FieldByName("fundaccount_count"));
                money_count = Convert.ToInt32(objComm.FieldByName("money_count"));
                money_type = objComm.FieldByName("money_type");
                square_flag = objComm.FieldByName("square_flag");
                enable_balance = Convert.ToDouble(objComm.FieldByName("enable_balance"));
                current_balance = Convert.ToDouble(objComm.FieldByName("current_balance"));
                client_rights = objComm.FieldByName("client_rights");
                bank_no = objComm.FieldByName("bank_no");
                exchange_type = objComm.FieldByName("exchange_type");
                exchange_name = objComm.FieldByName("exchange_name");
                stock_account = objComm.FieldByName("stock_account");
                login_date = Convert.ToInt32(objComm.FieldByName("login_date"));
                login_time = Convert.ToInt32(objComm.FieldByName("login_time"));
                last_op_entrust_way = objComm.FieldByName("last_op_entrust_way");
                last_op_station = objComm.FieldByName("last_op_station");
                last_op_ip = objComm.FieldByName("last_op_ip");
                bank_trans_flag = objComm.FieldByName("bank_trans_flag");
                tabconfirm_flag = objComm.FieldByName("tabconfirm_flag");
                initpasswd_flag = objComm.FieldByName("initpasswd_flag");
                init_date = Convert.ToInt32(objComm.FieldByName("init_date"));
                last_date = Convert.ToInt32(objComm.FieldByName("last_date"));
                company_name = objComm.FieldByName("company_name");
                message_flag = objComm.FieldByName("message_flag");
                sys_status = objComm.FieldByName("sys_status");
                sys_status_name = objComm.FieldByName("sys_status_name");
                remark = objComm.FieldByName("remark");
                corp_client_group = Convert.ToInt32(objComm.FieldByName("corp_client_group"));
            }
            /// <summary>
            /// 帐号校验方式 
            /// </summary>
            public string content_type { get; set; }
            /// <summary>
            /// 输入内容 
            /// </summary>
            public string account_content { get; set; }
            /// <summary>
            /// 分支代码 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 资金账号 
            /// </summary>
            public int fund_account { get; set; }
            /// <summary>
            /// 在线时间 
            /// </summary>
            public int online_time { get; set; }
            /// <summary>
            /// 客户号 
            /// </summary>
            public string client_id { get; set; }
            /// <summary>
            /// 客户姓名 
            /// </summary>
            public string client_name { get; set; }
            /// <summary>
            /// 资产账号个数，当客户号登录的时候返回资产账号个数，否则返回0 
            /// </summary>
            public int fundaccount_count { get; set; }
            /// <summary>
            /// 开通币种个数 
            /// </summary>
            public int money_count { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 结算标示，用来标志资产账户的结算模式。0-本地客户，1-银证通客户，2-第三方存管客户 
            /// </summary>
            public string square_flag { get; set; }
            /// <summary>
            /// 可用金额 
            /// </summary>
            public double enable_balance { get; set; }
            /// <summary>
            /// 当前余额 
            /// </summary>
            public double current_balance { get; set; }
            /// <summary>
            /// 客户权限 
            /// </summary>
            public string client_rights { get; set; }
            /// <summary>
            /// 银行代码 
            /// </summary>
            public string bank_no { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 市场名称 
            /// </summary>
            public string exchange_name { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 上次登录日期 
            /// </summary>
            public int login_date { get; set; }
            /// <summary>
            /// 上次登录时刻 
            /// </summary>
            public int login_time { get; set; }
            /// <summary>
            /// 上次登陆委托方式 
            /// </summary>
            public string last_op_entrust_way { get; set; }
            /// <summary>
            /// 上次登陆站点/电话 
            /// </summary>
            public string last_op_station { get; set; }
            /// <summary>
            /// 上次登陆IP地址 
            /// </summary>
            public string last_op_ip { get; set; }
            /// <summary>
            /// 银行转帐允许标志 
            /// </summary>
            public string bank_trans_flag { get; set; }
            /// <summary>
            /// 强制帐单确认 
            /// </summary>
            public string tabconfirm_flag { get; set; }
            /// <summary>
            /// 初始密码标志 
            /// </summary>
            public string initpasswd_flag { get; set; }
            /// <summary>
            /// 当前交易日期 
            /// </summary>
            public int init_date { get; set; }
            /// <summary>
            /// 上一交易日 
            /// </summary>
            public int last_date { get; set; }
            /// <summary>
            /// 公司名称 
            /// </summary>
            public string company_name { get; set; }
            /// <summary>
            /// 消息标志 
            /// </summary>
            public string message_flag { get; set; }
            /// <summary>
            /// 系统状态 
            /// </summary>
            public string sys_status { get; set; }
            /// <summary>
            /// 系统状态说明 
            /// </summary>
            public string sys_status_name { get; set; }
            /// <summary>
            /// 摘要 
            /// </summary>
            public string remark { get; set; }
            /// <summary>
            /// 公司客户类别 
            /// </summary>
            public int corp_client_group { get; set; }
        }

        ///<summary>
        ///功能号	200	版本号	3.7	更新日期	20090608
        ///功能名称	客户登录校验			结果集返回	N
        ///业务范围	公用			功能状态	公开
        ///功能描述	客户登录校验
        ///业务说明
        ///"注意： 由于目前的系统必须由branch_no + fund_account决定一个客户，所以用户必须输入branch_no。对于集中的数据库通炒系统来说，一个客户的分支在第一次输入时，可以输入0，表示不确定该客户的branch_no，但在服务端返回后，必须重新置分支号，以后的功能必须输入重置后的分支号，因为系统以下的功能必须按照分支与资金帐号校验客户。
        ///如果是分布型数据支持通炒方式，客户端必须要求客户输入确定的分支号，或者按某个规则得到确定的分支号码branch_no，或通过调用功能号104得到相应的分支号。"
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-41	资金密码到期未修改	需提示，仍可登录
        ///-42	交易密码到期未修改	需提示，仍可登录
        ///-51	无此帐户
        ///-61	帐户登录失败
        ///-63	密码错误
        ///-64	您没有此类委托的权限
        ///-66	您的帐户状态不正常
        ///-71	客户登陆受限
        ///修改记录	V3.7 20090608 张国强 增加输出参数corp_client_group，支持公司客户分类的返回
        ///</summary>
        ///<param name="op_branch_no">操作分支营业部号，以追踪该请求来自哪个分支。周边可以通过配置获得本操作分支营业部号，周边必须输入</param>
        ///<param name="branch_no ">是股民所在营业部号，用于通炒，可由股民自己选择输入，当股民不选择分支号，则周边应将其置为op_branch_no以表示本营业部</param>
        ///<param name="input_content">帐号类型，‘1’，‘2’，‘3’，4’，‘5’, ‘6’, ‘A’分别表示account_content代表资金帐号，股东内码，和资金卡号，银行帐号，股东帐号，客户编号，期货帐号</param>
        ///<param name="password">交易密码</param>
        ///<param name="content_type">帐号校验方式，当input_content为‘4’，‘5’时，则content_type明确银行号和股东的市场类别，其它输入为‘0’。</param>
        ///<param name="account_content">输入内容</param>
        public ResultF200 F200客户登录校验(int op_branch_no, int branch_no, string input_content, string password, string content_type, string account_content)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 200);
            objComm.SetRange(9, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("input_content");
            objComm.AddField("password");
            objComm.AddField("content_type");
            objComm.AddField("account_content");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(input_content);
            objComm.AddValue(password);
            objComm.AddValue(content_type);
            objComm.AddValue(account_content);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF200 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF200(objComm);
            }
            return result;

        }

        /// <summary>
        /// F201 修改客户密码 的返回结果
        /// </summary>
        public class ResultF201
        {
            public ResultF201(Comm objComm)
            {
            }
        }

        ///<summary>
        ///功能号	201	版本号	3.7	更新日期	20090608
        ///功能名称	修改客户密码			结果集返回	N
        ///业务范围	公用			功能状态	公开
        ///功能描述	修改客户密码
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	密码更改失败	（包括其它所有错误）
        ///-68	密码长度不足
        ///修改记录
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">原用户密码</param>
        ///<param name="password_type">密码类别 '1’：资金密码‘2’：交易密码 一次只能修改一个密码。</param>
        ///<param name="new_password">新密码</param>
        public ResultF201 F201修改客户密码(int branch_no, int fund_account, string password, string password_type, string new_password)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 201);
            objComm.SetRange(8, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("password_type");
            objComm.AddField("new_password");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(password_type);
            objComm.AddValue(new_password);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF201 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF201(objComm);
            }
            return result;

        }

        /// <summary>
        /// F205 客户认证 的返回结果
        /// </summary>
        public class ResultF205
        {
            public ResultF205(Comm objComm)
            {
                fund_account = Convert.ToInt32(objComm.FieldByName("fund_account"));
                certify_type = objComm.FieldByName("certify_type");
                certify_code = objComm.FieldByName("certify_code");
                e_mail = objComm.FieldByName("e_mail");
            }
            /// <summary>
            /// 资金账号 
            /// </summary>
            public int fund_account { get; set; }
            /// <summary>
            /// 证书类别 
            /// </summary>
            public string certify_type { get; set; }
            /// <summary>
            /// 证书号码 
            /// </summary>
            public string certify_code { get; set; }
            /// <summary>
            /// 电子信箱 
            /// </summary>
            public string e_mail { get; set; }
        }

        ///<summary>
        ///功能号	205	版本号	3.7	更新日期	20090608
        ///功能名称	客户认证			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	客户认证
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	取客户认证失败
        ///修改记录
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">原用户密码</param>
        public ResultF205 F205客户认证(int branch_no, int fund_account, string password)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 205);
            objComm.SetRange(6, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF205 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF205(objComm);
            }
            return result;

        }

        /// <summary>
        /// F206 客户信息修改 的返回结果
        /// </summary>
        public class ResultF206
        {
            public ResultF206(Comm objComm)
            {
            }
        }

        ///<summary>
        ///功能号	206	版本号	3.7	更新日期	20090608
        ///功能名称	客户信息修改			结果集返回	N
        ///业务范围	公用			功能状态	公开
        ///功能描述	客户信息修改
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	无此客户
        ///-61	客户密码错误
        ///-62	修改客户信息失败
        ///修改记录
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">用户密码</param>
        ///<param name="zipcode">邮政编码</param>
        ///<param name="address">联系地址</param>
        ///<param name="id_address">身份证地址</param>
        ///<param name="phonecode">联系电话</param>
        ///<param name="fax">传真号码</param>
        ///<param name="mobiletelephone">移动电话</param>
        ///<param name="beeppager">传呼号码</param>
        ///<param name="e_mail">电子信箱</param>
        public ResultF206 F206客户信息修改(int branch_no, int fund_account, string password, string zipcode, string address, string id_address, string phonecode, string fax, string mobiletelephone, string beeppager, string e_mail)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 206);
            objComm.SetRange(14, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("zipcode");
            objComm.AddField("address");
            objComm.AddField("id_address");
            objComm.AddField("phonecode");
            objComm.AddField("fax");
            objComm.AddField("mobiletelephone");
            objComm.AddField("beeppager");
            objComm.AddField("e_mail");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(zipcode);
            objComm.AddValue(address);
            objComm.AddValue(id_address);
            objComm.AddValue(phonecode);
            objComm.AddValue(fax);
            objComm.AddValue(mobiletelephone);
            objComm.AddValue(beeppager);
            objComm.AddValue(e_mail);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF206 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF206(objComm);
            }
            return result;

        }

        /// <summary>
        /// F207 增加客户权限 的返回结果
        /// </summary>
        public class ResultF207
        {
            public ResultF207(Comm objComm)
            {
            }
        }

        ///<summary>
        ///功能号	207	版本号	3.7	更新日期	20090608
        ///功能名称	增加客户权限			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	增加客户权限
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	无此客户
        ///-61	客户密码错误
        ///-62	增加客户权限失败
        ///修改记录
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="client_rights">客户权限</param>
        public ResultF207 F207增加客户权限(int branch_no, int fund_account, string client_rights)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 207);
            objComm.SetRange(6, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("fund_account");
            objComm.AddField("client_rights");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(client_rights);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF207 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF207(objComm);
            }
            return result;

        }

        /// <summary>
        /// F208 删除客户权限 的返回结果
        /// </summary>
        public class ResultF208
        {
            public ResultF208(Comm objComm)
            {
            }
        }

        ///<summary>
        ///功能号	208	版本号	3.7	更新日期	20090608
        ///功能名称	删除客户权限			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	删除客户权限
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	无此客户
        ///-61	客户密码错误
        ///-62	删除客户权限失败
        ///修改记录
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="client_rights">客户权限</param>
        public ResultF208 F208删除客户权限(int branch_no, int fund_account, string client_rights)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 208);
            objComm.SetRange(6, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("fund_account");
            objComm.AddField("client_rights");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(client_rights);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF208 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF208(objComm);
            }
            return result;

        }

        /// <summary>
        /// F209 查询客户帐号 的返回结果
        /// </summary>
        public class ResultF209
        {
            public ResultF209(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                fund_account = Convert.ToInt32(objComm.FieldByName("fund_account"));
                online_time = Convert.ToInt32(objComm.FieldByName("online_time"));
                client_name = objComm.FieldByName("client_name");
                money_count = Convert.ToInt32(objComm.FieldByName("money_count"));
                money_type = objComm.FieldByName("money_type");
                enable_balance = Convert.ToDouble(objComm.FieldByName("enable_balance"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                client_rights = objComm.FieldByName("client_rights");
            }
            /// <summary>
            /// 分支代码 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 资金账号 
            /// </summary>
            public int fund_account { get; set; }
            /// <summary>
            /// 在线时间 
            /// </summary>
            public int online_time { get; set; }
            /// <summary>
            /// 客户姓名 
            /// </summary>
            public string client_name { get; set; }
            /// <summary>
            /// 币种个数 
            /// </summary>
            public int money_count { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 可用金额 
            /// </summary>
            public double enable_balance { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 客户权限，主要用于680委托时返回其680委托权限，包含Y为托银客户 
            /// </summary>
            public string client_rights { get; set; }
        }

        ///<summary>
        ///功能号	209	版本号	3.7	更新日期	20090608
        ///功能名称	查询客户帐号			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询客户帐号
        ///业务说明
        ///"注意：
        ///由于目前的系统必须由branch_no + fund_account决定一个客户，所以用户必须输入branch_no。对于集中的数据库通炒系统来说，一个客户的分支在第一次输入时，可以输入0，表示不确定该客户的branch_no，但在服务端返回后，必须重新置分支号，以后的功能必须输入重置后的分支号，因为系统以下的功能必须按照分支与资金帐号校验客户。
        ///如果是分布型数据支持通炒方式，客户端必须要求客户输入确定的分支号，或者按某个规则得到确定的分支号码branch_no，或通过调用功能号104得到相应的分支号。
        ///如果account_content为‘2’，‘5’时，返回中的exchang_type和stock_account存在意义,否则这两个域值无意义。"
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	无此帐户
        ///-66	您的帐户状态不正常
        ///-64	您没有此类委托的权限
        ///-61	帐户登录失败
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作分支营业部号，以追踪该请求来自哪个分支。周边可以通过配置获得本操作分支营业部号，周边必须输入</param>
        ///<param name="branch_no">分支代码，是股民所在营业部号，用于通炒，可由股民自己选择输入，当股民不选择分支号，则周边应将其置为op_branch_no以表示本营业部。</param>
        ///<param name="input_content">帐号类型，‘1’，‘2’，‘3’，4’，‘5’, ‘6’分别表示account_content代表资金帐号，股东内码，和资金卡号，银行帐号，股东帐号，客户编号</param>
        ///<param name="content_type">校验方式 当input_content为‘4’，‘5’时，则content_type明确银行号和股东的市场类别，其它输入为‘0‘</param>
        ///<param name="account_content">帐户号</param>
        ///<param name="password">交易密码</param>
        ///<param name="old_password">原用户密码</param>
        ///<param name="bk_password">银行密码</param>
        public ResultF209 F209查询客户帐号(int op_branch_no, int branch_no, string input_content, string content_type, string account_content, string password, string old_password, string bk_password)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 209);
            objComm.SetRange(11, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("input_content");
            objComm.AddField("content_type");
            objComm.AddField("account_content");
            objComm.AddField("password");
            objComm.AddField("old_password");
            objComm.AddField("bk_password");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(input_content);
            objComm.AddValue(content_type);
            objComm.AddValue(account_content);
            objComm.AddValue(password);
            objComm.AddValue(old_password);
            objComm.AddValue(bk_password);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF209 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF209(objComm);
            }
            return result;

        }

        /// <summary>
        /// F213 增加委托方式 的返回结果
        /// </summary>
        public class ResultF213
        {
            public ResultF213(Comm objComm)
            {
            }
        }

        ///<summary>
        ///功能号	213	版本号	3.7	更新日期	20090608
        ///功能名称	增加委托方式			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	增加委托方式
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	无此客户
        ///-61	客户密码错误
        ///-62	增加委托方式失败
        ///修改记录
        ///</summary>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="entrust_way">委托方式</param>
        public ResultF213 F213增加委托方式(int branch_no, int fund_account, string password, string entrust_way)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 213);
            objComm.SetRange(7, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no ");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("entrust_way");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(entrust_way);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF213 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF213(objComm);
            }
            return result;

        }

        /// <summary>
        /// F214 减少委托方式 的返回结果
        /// </summary>
        public class ResultF214
        {
            public ResultF214(Comm objComm)
            {
            }
        }

        ///<summary>
        ///功能号	214	版本号	3.7	更新日期	20090608
        ///功能名称	减少委托方式			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	减少委托方式
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	无此客户
        ///-61	客户密码错误
        ///-62	减少委托方式失败
        ///修改记录
        ///</summary>
        ///<param name="fund_account">资金账号</param>
        ///<param name="branch_no ">分支代码</param>
        ///<param name="password">交易密码</param>
        ///<param name="entrust_way">委托方式</param>
        public ResultF214 F214减少委托方式(int fund_account, int branch_no, string password, string entrust_way)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 214);
            objComm.SetRange(7, 1);
            objComm.AddField("version");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("fund_account");
            objComm.AddField("branch_no ");
            objComm.AddField("password");
            objComm.AddField("entrust_way");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(password);
            objComm.AddValue(entrust_way);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF214 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF214(objComm);
            }
            return result;

        }

        /// <summary>
        /// F300 委托股票 的返回结果
        /// </summary>
        public class ResultF300
        {
            public ResultF300(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                fund_account = Convert.ToInt32(objComm.FieldByName("fund_account"));
                exchange_type = objComm.FieldByName("exchange_type");
                exchange_name = objComm.FieldByName("exchange_name");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                stock_type = objComm.FieldByName("stock_type");
                money_type = objComm.FieldByName("money_type");
                last_price = Convert.ToDouble(objComm.FieldByName("last_price"));
                up_price = Convert.ToDouble(objComm.FieldByName("up_price"));
                down_price = Convert.ToDouble(objComm.FieldByName("down_price"));
                cost_price = Convert.ToDouble(objComm.FieldByName("cost_price"));
                hand_flag = objComm.FieldByName("hand_flag");
                income_balance = Convert.ToDouble(objComm.FieldByName("income_balance"));
                enable_amount = Convert.ToDouble(objComm.FieldByName("enable_amount"));
                transmit_amount = Convert.ToDouble(objComm.FieldByName("transmit_amount"));
                enable_balance = Convert.ToDouble(objComm.FieldByName("enable_balance"));
                fetch_balance = Convert.ToDouble(objComm.FieldByName("fetch_balance"));
                stock_interest = Convert.ToDouble(objComm.FieldByName("stock_interest"));
            }
            /// <summary>
            /// 分支代码 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 资金账号 
            /// </summary>
            public int fund_account { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 交易名称 
            /// </summary>
            public string exchange_name { get; set; }
            /// <summary>
            /// 证券帐号，如果请求stock_account为空，返回请求stock_code对应市场的主股东帐号；不为空，且请求stock_account和请求stock_code对应市场市场不一致，等同请求stock_account为空的做法；其它则返回的是请求stock_account的信息。 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 证券类别 
            /// </summary>
            public string stock_type { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 最新价 
            /// </summary>
            public double last_price { get; set; }
            /// <summary>
            /// 上限价 
            /// </summary>
            public double up_price { get; set; }
            /// <summary>
            /// 下限价 
            /// </summary>
            public double down_price { get; set; }
            /// <summary>
            /// 买入成本价 
            /// </summary>
            public double cost_price { get; set; }
            /// <summary>
            /// 委托的股手标志，'0'--股   '1' -- 手 
            /// </summary>
            public string hand_flag { get; set; }
            /// <summary>
            /// 盈亏金额 
            /// </summary>
            public double income_balance { get; set; }
            /// <summary>
            /// 可卖数量 
            /// </summary>
            public double enable_amount { get; set; }
            /// <summary>
            /// 委托卖出数量，质押式国债若输入的是出入库委托（证券代码），表示可出库标准券数量 
            /// </summary>
            public double transmit_amount { get; set; }
            /// <summary>
            /// 可用金额 
            /// </summary>
            public double enable_balance { get; set; }
            /// <summary>
            /// 可取金额 
            /// </summary>
            public double fetch_balance { get; set; }
            /// <summary>
            /// 国债百元利息额，如果不是国债，则小于零；质押式国债若输入的是出入库委托（证券代码），表示质押比率 
            /// </summary>
            public double stock_interest { get; set; }
        }

        ///<summary>
        ///功能号	300	版本号	3.7	更新日期	20090608
        ///功能名称	委托股票			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	委托股票
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	未登记该交易所帐号
        ///-52	此股票不存在
        ///-64	此股不能进行此类委托	（包括该股民无权进行此类股票的委托）
        ///-65	此股票停牌，可能无效	（不管停牌允不允许委托，都要报此警告）
        ///-66	帐户状态不正常
        ///-67	您未作指定交易
        ///-61	本次输入无效	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="password">交易密码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="exchange_type">交易类别</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码，包含股票内码和股票代码两个含义，如果exchang_type为空格，则该值为股票内码,其它则为股票代码。</param>
        ///<param name="entrust_prop">委托属性，默认送'0'-买卖，对开放式基金申购赎回和权证行权等业务，需要传入特定的委托属性，以和普通买卖区分。（v3.1增加</param>
        public ResultF300 F300委托股票(int op_branch_no, string password, int branch_no, int fund_account, string exchange_type, string stock_account, string stock_code, string entrust_prop)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 300);
            objComm.SetRange(11, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("password");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("entrust_prop");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(password);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(entrust_prop);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF300 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF300(objComm);
            }
            return result;

        }

        /// <summary>
        /// F301 委托价格 的返回结果
        /// </summary>
        public class ResultF301
        {
            public ResultF301(Comm objComm)
            {
                enable_amount = Convert.ToDouble(objComm.FieldByName("enable_amount"));
            }
            /// <summary>
            /// 可买数量（买入） 
            /// </summary>
            public double enable_amount { get; set; }
        }

        ///<summary>
        ///功能号	301	版本号	3.7	更新日期	20090608
        ///功能名称	委托价格			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	委托价格
        ///业务说明
        ///"注意：对于基金转换业务（上海，W委托属性），entrust_price前台送目标代码，格式为519.***。
        ///对于质押出入库业务（f委托属性），entrust_price前台送1。
        ///对于市价委托业务（深圳，QSUTV五种委托属性），entrust_price前台送1。"
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-56	委托价格超过涨跌停范围
        ///-61	本次输入无效	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码</param>
        ///<param name="entrust_price">委托价格</param>
        ///<param name="bk_enable_balance">银行可用金额（银证通用），查本地资金送-1</param>
        ///<param name="entrust_prop">委托属性，默认送'0'-买卖，对开放式基金申购赎回和权证行权等业务，需要传入特定的委托属性，以和普通买卖区分。（v3.1增加</param>
        public ResultF301 F301委托价格(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_account, string stock_code, double entrust_price, double bk_enable_balance, string entrust_prop)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 301);
            objComm.SetRange(13, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("entrust_price");
            objComm.AddField("bk_enable_balance");
            objComm.AddField("entrust_prop");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(entrust_price.ToString());
            objComm.AddValue(bk_enable_balance.ToString());
            objComm.AddValue(entrust_prop);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF301 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF301(objComm);
            }
            return result;

        }

        /// <summary>
        /// F302 委托确认 的返回结果
        /// </summary>
        public class ResultF302
        {
            public ResultF302(Comm objComm)
            {
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
            }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
        }

        ///<summary>
        ///功能号	302	版本号	3.7	更新日期	20090608
        ///功能名称	委托确认			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	委托确认
        ///业务说明
        ///"注意：对于基金转换业务（上海，W委托属性），entrust_price前台送目标代码，格式为519.***。
        ///对于质押出入库业务（f委托属性），entrust_price前台送1。
        ///对于市价委托业务（深圳，QSUTV五种委托属性），entrust_price前台送1。"
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	未登记该交易所帐号
        ///-52	此股票不存在
        ///-55	数量不符合交易所规定
        ///-56	委托价格不符合交易所规定
        ///-57	可用金额不足
        ///-58	股票余额不足
        ///-59	闭市时间不能委托
        ///-64	此股不能进行此类委托
        ///-65	此股票停牌，不能委托	（如果停牌允许委托，不报错误）
        ///-66	帐户状态不正常
        ///-67	您未作指定交易
        ///-61	委托失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="password">交易密码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号，必须输入</param>
        ///<param name="exchange_type">交易类别，必须输入确定的市场，不支持‘0‘或空格。</param>
        ///<param name="stock_account">证券帐号，必须输入交易的股东代码，不支持内码。</param>
        ///<param name="stock_code">证券代码，必须输入确定的股票代码，不支持内码。</param>
        ///<param name="entrust_amount">委托数量</param>
        ///<param name="entrust_price">委托价格</param>
        ///<param name="entrust_prop">委托属性，默认送'0'-买卖，对开放式基金申购赎回和权证行权等业务，需要传入特定的委托属性，以和普通买卖区分。（v3.1增加</param>
        ///<param name="entrust_bs">买卖方向 1 买入 2 卖出</param>
        ///<param name="bank_no">用于区别是普通委托还是680委托，普通委托为‘0’，680委托为相应的银行号。（暂不使用）</param>
        ///<param name="client_rights">客户权限，主要用于680委托时返回其680委托权限，包含Y为托银客户（暂不使用）</param>
        public ResultF302 F302委托确认(int op_branch_no, string password, int branch_no, int fund_account, string exchange_type, string stock_account, string stock_code, double entrust_amount, double entrust_price, string entrust_prop, string entrust_bs, string bank_no, string client_rights)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 302);
            objComm.SetRange(16, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("password");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("entrust_amount");
            objComm.AddField("entrust_price");
            objComm.AddField("entrust_prop");
            objComm.AddField("entrust_bs");
            objComm.AddField("bank_no");
            objComm.AddField("client_rights");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(password);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(entrust_amount.ToString());
            objComm.AddValue(entrust_price.ToString());
            objComm.AddValue(entrust_prop);
            objComm.AddValue(entrust_bs);
            objComm.AddValue(bank_no);
            objComm.AddValue(client_rights);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF302 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF302(objComm);
            }
            return result;

        }

        /// <summary>
        /// F303 可撤单查询 的返回结果
        /// </summary>
        public class ResultF303
        {
            public ResultF303(Comm objComm)
            {
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                entrust_bs = objComm.FieldByName("entrust_bs");
                entrust_price = Convert.ToDouble(objComm.FieldByName("entrust_price"));
                entrust_amount = Convert.ToDouble(objComm.FieldByName("entrust_amount"));
                business_amount = Convert.ToDouble(objComm.FieldByName("business_amount"));
                entrust_status = objComm.FieldByName("entrust_status");
            }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 委托号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 买卖方向，1买入2卖出 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 委托价格 
            /// </summary>
            public double entrust_price { get; set; }
            /// <summary>
            /// 委托数量 
            /// </summary>
            public double entrust_amount { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double business_amount { get; set; }
            /// <summary>
            /// 委托状态 
            /// </summary>
            public string entrust_status { get; set; }
        }

        ///<summary>
        ///功能号	303	版本号	3.7	更新日期	20090608
        ///功能名称	可撤单查询			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	可撤单查询
        ///业务说明
        ///委托状态说明：
        ///值 说明     是否可撤
        ///0  未报     可以
        ///1  待报     不可以
        ///2  已报     可以
        ///3  已报待撤 不可以
        ///4  部成待撤 不可以
        ///5  部撤     不可以
        ///6  已撤     不可以
        ///7  部成     可以
        ///8  已成     不可以
        ///9  废单     不可以
        ///W  待确认   不可以
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-53	无此委托	（包含此委托不是该股民的）
        ///-54	此委托不能撤单	（包含其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="password">交易密码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="stock_account">证券帐号，为空，取fund_account下的所有委托；不为空，取fund_account+stock_account的所有委托（暂不使用）。</param>
        ///<param name="entrust_no">委托号，为0，取所有委托，不为0，取该笔委托，如果该笔非fund_account和stock_account的委托，该笔将取不到</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF303> F303可撤单查询(int op_branch_no, int branch_no, string password, int fund_account, string stock_account, int entrust_no, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 303);
            objComm.SetRange(11, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("password");
            objComm.AddField("fund_account");
            objComm.AddField("stock_account");
            objComm.AddField("entrust_no");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(password);
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(stock_account);
            objComm.AddValue(entrust_no.ToString());
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF303> result = new List<ResultF303>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF303(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F304 委托撤单 的返回结果
        /// </summary>
        public class ResultF304
        {
            public ResultF304(Comm objComm)
            {
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
            }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
        }

        ///<summary>
        ///功能号	304	版本号	3.7	更新日期	20090608
        ///功能名称	委托撤单			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	委托撤单
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-53	无此委托	（包含此委托不是该股民的）
        ///-54	此委托不能撤单
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">客户分支号</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="batch_flag">批量标志 '0'--单笔 '1'--批量</param>
        ///<param name="exchange_type">交易类别,如果账号指定市场全撤的时候才必须输入。</param>
        ///<param name="entrust_no">委托编号,使用批量撤单标志batch_flag为‘1‘，则将理解为批号，其它为委托编号，如果为0，则如果批量标志为‘1’，那么批量撤单账号整个市场的。</param>
        public ResultF304 F304委托撤单(int op_branch_no, int branch_no, int fund_account, string password, string batch_flag, string exchange_type, int entrust_no)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 304);
            objComm.SetRange(10, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("batch_flag");
            objComm.AddField("exchange_type");
            objComm.AddField("entrust_no");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(batch_flag);
            objComm.AddValue(exchange_type);
            objComm.AddValue(entrust_no.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF304 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF304(objComm);
            }
            return result;

        }

        /// <summary>
        /// F305 前台收费 的返回结果
        /// </summary>
        public class ResultF305
        {
            public ResultF305(Comm objComm)
            {
            }
        }

        ///<summary>
        ///功能号	305	版本号	3.7	更新日期	20090608
        ///功能名称	前台收费			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	前台收费，系统在客户退出时都应发出前台收费请求，系统将根据此来保存客户的登录的一些信息，同时对客户的操作进行收费处理（如果有前台费用的设置）
        ///业务说明
        ///系统在客户退出时都应发出前台收费请求，系统将根据此来保存客户的登录的一些信息，同时对客户的操作进行收费处理（如果有前台费用的设置）
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	收费失败	（包含所有错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="password">交易密码</param>
        ///<param name="ffare0_times">划卡次数</param>
        ///<param name="ffare1_times">委托次数</param>
        ///<param name="ffare2_times">撤单次数</param>
        ///<param name="ffare3_times">超时次数</param>
        ///<param name="login_time">登录次数</param>
        public ResultF305 F305前台收费(int op_branch_no, int fund_account, int branch_no, string password, int ffare0_times, int ffare1_times, int ffare2_times, int ffare3_times, int login_time)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 305);
            objComm.SetRange(12, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("fund_account");
            objComm.AddField("branch_no");
            objComm.AddField("password");
            objComm.AddField("ffare0_times");
            objComm.AddField("ffare1_times");
            objComm.AddField("ffare2_times");
            objComm.AddField("ffare3_times");
            objComm.AddField("login_time");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(password);
            objComm.AddValue(ffare0_times.ToString());
            objComm.AddValue(ffare1_times.ToString());
            objComm.AddValue(ffare2_times.ToString());
            objComm.AddValue(ffare3_times.ToString());
            objComm.AddValue(login_time.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF305 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF305(objComm);
            }
            return result;

        }

        /// <summary>
        /// F306 批量委托买入 的返回结果
        /// </summary>
        public class ResultF306
        {
            public ResultF306(Comm objComm)
            {
                entrust_amount = Convert.ToDouble(objComm.FieldByName("entrust_amount"));
                entrust_count = Convert.ToInt32(objComm.FieldByName("entrust_count"));
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
            }
            /// <summary>
            /// 委托数量 
            /// </summary>
            public double entrust_amount { get; set; }
            /// <summary>
            /// 委托成功股数 
            /// </summary>
            public int entrust_count { get; set; }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
        }

        ///<summary>
        ///功能号	306	版本号	3.7	更新日期	20090608
        ///功能名称	批量委托买入			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	批量委托买入
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	此股票不存在
        ///-55	数量不符合交易所规定
        ///-56	价格不符合交易所规定
        ///-57	资金不足	（如果资金够委托一笔以上，则不报此错，返回成功）
        ///-59	闭市时间不能委托
        ///-64	此股不能进行此类委托	（包括该股民无权进行此类股票的委托）
        ///-65	此股票停牌，不能委托	（如果停牌允许委托，不报错误）
        ///-61	委托失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="entrust_bs">买卖方向，必须填入’1’</param>
        ///<param name="exchange_type">交易类别，必须输入确定的市场，不支持0或空格。</param>
        ///<param name="stock_code">证券代码，必须输入股东代码，不支持内码。</param>
        ///<param name="entrust_price">委托价格</param>
        ///<param name="entrust_amount">委托数量，每个股东账号上的数量，返回参数中表示委托成功后返回成功数量。</param>
        ///<param name="entrust_count">委托笔数，当entrust_style送2的时候，选择在单个股东账号上进行批量买入的笔数</param>
        ///<param name="enable_balance">发生金额，总共动用的资金。</param>
        ///<param name="entrust_style">委托类型，必须输入0（多股东委托）或2（单股东委托）</param>
        ///<param name="start_no">起始委托帐户，从第几个股东账号买起。</param>
        ///<param name="stock_account">股东账户，当entrust_style送2的时候，选择在此股东账号上进行单股东的多笔批量委托</param>
        public ResultF306 F306批量委托买入(int op_branch_no, int branch_no, int fund_account, string password, string entrust_bs, string exchange_type, string stock_code, double entrust_price, double entrust_amount, int entrust_count, double enable_balance, string entrust_style, int start_no, string stock_account)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 306);
            objComm.SetRange(17, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("entrust_bs");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_code");
            objComm.AddField("entrust_price");
            objComm.AddField("entrust_amount");
            objComm.AddField("entrust_count");
            objComm.AddField("enable_balance");
            objComm.AddField("entrust_style");
            objComm.AddField("start_no");
            objComm.AddField("stock_account");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(entrust_bs);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_code);
            objComm.AddValue(entrust_price.ToString());
            objComm.AddValue(entrust_amount.ToString());
            objComm.AddValue(entrust_count.ToString());
            objComm.AddValue(enable_balance.ToString());
            objComm.AddValue(entrust_style);
            objComm.AddValue(start_no.ToString());
            objComm.AddValue(stock_account);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF306 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF306(objComm);
            }
            return result;

        }

        /// <summary>
        /// F307 批量委托卖出 的返回结果
        /// </summary>
        public class ResultF307
        {
            public ResultF307(Comm objComm)
            {
                entrust_amount = Convert.ToDouble(objComm.FieldByName("entrust_amount"));
                entrust_count = Convert.ToInt32(objComm.FieldByName("entrust_count"));
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
            }
            /// <summary>
            /// 委托数量，卖出最大数量 
            /// </summary>
            public double entrust_amount { get; set; }
            /// <summary>
            /// 委托成功股数，启用多少个股东账号，返回参数中表示委托成功后返回成功笔数 
            /// </summary>
            public int entrust_count { get; set; }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
        }

        ///<summary>
        ///功能号	307	版本号	3.7	更新日期	20090608
        ///功能名称	批量委托卖出			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	批量委托卖出
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	此股票不存在
        ///-55	数量不符合交易所规定
        ///-56	价格不符合交易所规定
        ///-57	资金不足	（如果资金够委托一笔以上，则不报此错，返回成功）
        ///-59	闭市时间不能委托
        ///-64	此股不能进行此类委托	（包括该股民无权进行此类股票的委托）
        ///-65	此股票停牌，不能委托	（如果停牌允许委托，不报错误）
        ///-61	委托失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">营业部号</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="entrust_bs">买卖方向，必须填入’2’</param>
        ///<param name="exchange_type">交易类别，必须输入确定的市场，不支持0或空格。</param>
        ///<param name="stock_code">证券代码，必须输入股东代码，不支持内码。</param>
        ///<param name="entrust_price">委托价格</param>
        ///<param name="entrust_amount">委托数量，总的卖出的数量，返回参数中表示委托成功后返回成功数量</param>
        ///<param name="entrust_style">委托类型，必须输入0（多股东委托）或2（单股东委托）</param>
        ///<param name="start_no">起始委托帐户，从第几个股东账号买起。</param>
        ///<param name="max_amount">最大数量，限定了在任一股东帐号上最多卖出的股票数。</param>
        ///<param name="stock_account">股东账户，当entrust_style送2的时候，选择在此股东账号上进行单股东的多笔批量委托</param>
        public ResultF307 F307批量委托卖出(int op_branch_no, int branch_no, int fund_account, string password, string entrust_bs, string exchange_type, string stock_code, double entrust_price, double entrust_amount, string entrust_style, int start_no, int max_amount, string stock_account)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 307);
            objComm.SetRange(16, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("entrust_bs");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_code");
            objComm.AddField("entrust_price");
            objComm.AddField("entrust_amount");
            objComm.AddField("entrust_style");
            objComm.AddField("start_no");
            objComm.AddField("max_amount");
            objComm.AddField("stock_account");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(entrust_bs);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_code);
            objComm.AddValue(entrust_price.ToString());
            objComm.AddValue(entrust_amount.ToString());
            objComm.AddValue(entrust_style);
            objComm.AddValue(start_no.ToString());
            objComm.AddValue(max_amount.ToString());
            objComm.AddValue(stock_account);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF307 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF307(objComm);
            }
            return result;

        }

        /// <summary>
        /// F308 普通交割 的返回结果
        /// </summary>
        public class ResultF308
        {
            public ResultF308(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                date = Convert.ToInt32(objComm.FieldByName("date"));
                business_flag = Convert.ToInt32(objComm.FieldByName("business_flag"));
                business_name = objComm.FieldByName("business_name");
                business_type = objComm.FieldByName("business_type");
                type_name = objComm.FieldByName("type_name");
                exchange_type = objComm.FieldByName("exchange_type");
                exchange_name = objComm.FieldByName("exchange_name");
                stock_account = objComm.FieldByName("stock_account");
                seat_no = objComm.FieldByName("seat_no");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_bs = objComm.FieldByName("entrust_bs");
                bs_name = objComm.FieldByName("bs_name");
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                occur_amount = Convert.ToDouble(objComm.FieldByName("occur_amount"));
                business_balance = Convert.ToDouble(objComm.FieldByName("business_balance"));
                occur_balance = Convert.ToDouble(objComm.FieldByName("occur_balance"));
                post_balance = Convert.ToDouble(objComm.FieldByName("post_balance"));
                post_amount = Convert.ToDouble(objComm.FieldByName("post_amount"));
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                business_no = Convert.ToInt32(objComm.FieldByName("business_no"));
                report_no = Convert.ToInt32(objComm.FieldByName("report_no"));
                report_time = Convert.ToInt32(objComm.FieldByName("report_time"));
                business_time = Convert.ToInt32(objComm.FieldByName("business_time"));
                fare0 = Convert.ToDouble(objComm.FieldByName("fare0"));
                fare1 = Convert.ToDouble(objComm.FieldByName("fare1"));
                fare2 = Convert.ToDouble(objComm.FieldByName("fare2"));
                fare3 = Convert.ToDouble(objComm.FieldByName("fare3"));
                farex = Convert.ToDouble(objComm.FieldByName("farex"));
                remark = objComm.FieldByName("remark");
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 发生日期 
            /// </summary>
            public int date { get; set; }
            /// <summary>
            /// 业务标志 
            /// </summary>
            public int business_flag { get; set; }
            /// <summary>
            /// 业务名称 
            /// </summary>
            public string business_name { get; set; }
            /// <summary>
            /// 成交类别 
            /// </summary>
            public string business_type { get; set; }
            /// <summary>
            /// 成交类别名称 
            /// </summary>
            public string type_name { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 交易类别名称 
            /// </summary>
            public string exchange_name { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 席位编号 
            /// </summary>
            public string seat_no { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 买卖方向名称 
            /// </summary>
            public string bs_name { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 发生数量 
            /// </summary>
            public double occur_amount { get; set; }
            /// <summary>
            /// 成交金额 
            /// </summary>
            public double business_balance { get; set; }
            /// <summary>
            /// 发生金额 
            /// </summary>
            public double occur_balance { get; set; }
            /// <summary>
            /// 后资金额 
            /// </summary>
            public double post_balance { get; set; }
            /// <summary>
            /// 股票余额 
            /// </summary>
            public double post_amount { get; set; }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 成交编号 
            /// </summary>
            public int business_no { get; set; }
            /// <summary>
            /// 申请编号 
            /// </summary>
            public int report_no { get; set; }
            /// <summary>
            /// 申报时间 
            /// </summary>
            public int report_time { get; set; }
            /// <summary>
            /// 成交时间 
            /// </summary>
            public int business_time { get; set; }
            /// <summary>
            /// 佣金 
            /// </summary>
            public double fare0 { get; set; }
            /// <summary>
            /// 一级费用 
            /// </summary>
            public double fare1 { get; set; }
            /// <summary>
            /// 过户费 
            /// </summary>
            public double fare2 { get; set; }
            /// <summary>
            /// 费用3 
            /// </summary>
            public double fare3 { get; set; }
            /// <summary>
            /// 费用x 
            /// </summary>
            public double farex { get; set; }
            /// <summary>
            /// 备注 
            /// </summary>
            public string remark { get; set; }
        }

        ///<summary>
        ///功能号	308	版本号	3.7	更新日期	20090608
        ///功能名称	普通交割			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	普通交割
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	没有可交割记录
        ///-61	交割失败	（其他错误）
        ///修改记录	V3.7 20081224 张国强 增加输出参数申请编号report_no
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="start_date">起始日期</param>
        ///<param name="end_date">结束日期</param>
        ///<param name="exchange_type">交易类别</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码</param>
        ///<param name="deliver_type">交割状态:'0' 打未交割,'1'全部.</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF308> F308普通交割(int op_branch_no, int branch_no, int fund_account, string password, int start_date, int end_date, string exchange_type, string stock_account, string stock_code, string deliver_type, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 308);
            objComm.SetRange(16, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("deliver_type");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(deliver_type);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF308> result = new List<ResultF308>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF308(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F309 重置成本价 的返回结果
        /// </summary>
        public class ResultF309
        {
            public ResultF309(Comm objComm)
            {
            }
        }

        ///<summary>
        ///功能号	309	版本号	3.7	更新日期	20090608
        ///功能名称	重置成本价			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	重置成本价
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	重置失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别，不支持内码</param>
        ///<param name="stock_account">证券账号,不为空，则将stock_account帐号下的股票按此成本重置，否则将fund_account的股票进行成本重置。</param>
        ///<param name="stock_code">证券代码</param>
        ///<param name="cost_price">买入成本价，净成本价：截止到今日，该股票的平均成本。</param>
        ///<param name="income_balance">"盈亏金额，截止到今日，按上述成本，股民在该股票上的盈亏(实际买卖之后的盈亏,不包含浮动盈亏)。"</param>
        ///<param name="entrust_price">买入均价: 截止到今日,考虑收益后摊薄的该股票的买入均价。（暂不使用）</param>
        public ResultF309 F309重置成本价(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_account, string stock_code, double cost_price, double income_balance, double entrust_price)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 309);
            objComm.SetRange(13, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("cost_price");
            objComm.AddField("income_balance");
            objComm.AddField("entrust_price");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(cost_price.ToString());
            objComm.AddValue(income_balance.ToString());
            objComm.AddValue(entrust_price.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF309 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF309(objComm);
            }
            return result;

        }

        /// <summary>
        /// F332 三板报价转让委托确认 的返回结果
        /// </summary>
        public class ResultF332
        {
            public ResultF332(Comm objComm)
            {
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
            }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
        }

        ///<summary>
        ///功能号	332	版本号	3.7	更新日期	20090608
        ///功能名称	三板报价转让委托确认			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	委托确认
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	未登记该交易所帐号
        ///-52	此股票不存在
        ///-55	数量不符合交易所规定
        ///-56	委托价格不符合交易所规定
        ///-57	可用金额不足
        ///-58	股票余额不足
        ///-59	闭市时间不能委托
        ///-64	此股不能进行此类委托
        ///-65	此股票停牌，不能委托	（如果停牌允许委托，不报错误）
        ///-66	帐户状态不正常
        ///-67	您未作指定交易
        ///-61	委托失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="password">交易密码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号，必须输入</param>
        ///<param name="exchange_type">交易类别，必须输入确定的市场，不支持‘0‘或空格。</param>
        ///<param name="stock_account">证券帐号，必须输入交易的股东代码，不支持内码。</param>
        ///<param name="stock_code">证券代码，必须输入确定的股票代码，不支持内码。</param>
        ///<param name="entrust_amount">委托数量</param>
        ///<param name="entrust_price">委托价格</param>
        ///<param name="entrust_prop">"委托属性，默认送'0'-买卖，对开放式基金申购赎回和权证行权等业务，需要传入特定的委托属性，以和普通买卖区分。a意向委托b定价委托c确认委托"</param>
        ///<param name="entrust_bs">买卖方向 1 买入 2 卖出</param>
        ///<param name="oppo_seatno">对方席位(三板报价委托)</param>
        ///<param name="confer_no">双方约定号(三板报价委托)</param>
        public ResultF332 F332三板报价转让委托确认(int op_branch_no, string password, int branch_no, int fund_account, string exchange_type, string stock_account, string stock_code, double entrust_amount, double entrust_price, string entrust_prop, string entrust_bs, string oppo_seatno, int confer_no)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 332);
            objComm.SetRange(16, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("password");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("entrust_amount");
            objComm.AddField("entrust_price");
            objComm.AddField("entrust_prop");
            objComm.AddField("entrust_bs");
            objComm.AddField("oppo_seatno");
            objComm.AddField("confer_no");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(password);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(entrust_amount.ToString());
            objComm.AddValue(entrust_price.ToString());
            objComm.AddValue(entrust_prop);
            objComm.AddValue(entrust_bs);
            objComm.AddValue(oppo_seatno);
            objComm.AddValue(confer_no.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF332 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF332(objComm);
            }
            return result;

        }

        /// <summary>
        /// F333 三板报价转让委托查询 的返回结果
        /// </summary>
        public class ResultF333
        {
            public ResultF333(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_bs = objComm.FieldByName("entrust_bs");
                bs_name = objComm.FieldByName("bs_name");
                entrust_price = Convert.ToDouble(objComm.FieldByName("entrust_price"));
                entrust_amount = Convert.ToDouble(objComm.FieldByName("entrust_amount"));
                business_amount = Convert.ToDouble(objComm.FieldByName("business_amount"));
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                report_no = Convert.ToInt32(objComm.FieldByName("report_no"));
                report_time = Convert.ToInt32(objComm.FieldByName("report_time"));
                entrust_type = objComm.FieldByName("entrust_type");
                type_name = objComm.FieldByName("type_name");
                entrust_status = objComm.FieldByName("entrust_status");
                status_name = objComm.FieldByName("status_name");
                cancel_info = objComm.FieldByName("cancel_info");
                entrust_prop = objComm.FieldByName("entrust_prop");
                entrust_prop_name = objComm.FieldByName("entrust_prop_name");
                prop_seat_no = objComm.FieldByName("prop_seat_no");
                prop_stock_account = objComm.FieldByName("prop_stock_account");
                entrust_amount2 = Convert.ToDouble(objComm.FieldByName("entrust_amount2"));
                entrust_price2 = Convert.ToDouble(objComm.FieldByName("entrust_price2"));
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 委托序号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 买卖方向名称 
            /// </summary>
            public string bs_name { get; set; }
            /// <summary>
            /// 委托价格 
            /// </summary>
            public double entrust_price { get; set; }
            /// <summary>
            /// 委托数量 
            /// </summary>
            public double entrust_amount { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double business_amount { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 申报号 
            /// </summary>
            public int report_no { get; set; }
            /// <summary>
            /// 申报时间 
            /// </summary>
            public int report_time { get; set; }
            /// <summary>
            /// 委托类别 
            /// </summary>
            public string entrust_type { get; set; }
            /// <summary>
            /// 委托类别名称 
            /// </summary>
            public string type_name { get; set; }
            /// <summary>
            /// 委托状态 
            /// </summary>
            public string entrust_status { get; set; }
            /// <summary>
            /// 状态名称 
            /// </summary>
            public string status_name { get; set; }
            /// <summary>
            /// 废单原因 
            /// </summary>
            public string cancel_info { get; set; }
            /// <summary>
            /// 委托属性 
            /// </summary>
            public string entrust_prop { get; set; }
            /// <summary>
            /// 委托属性 
            /// </summary>
            public string entrust_prop_name { get; set; }
            /// <summary>
            /// 席位编号(三板报价委托) 
            /// </summary>
            public string prop_seat_no { get; set; }
            /// <summary>
            /// 申报账号(三板报价委托) 
            /// </summary>
            public string prop_stock_account { get; set; }
            /// <summary>
            /// 委托数量(三板报价委托) 
            /// </summary>
            public double entrust_amount2 { get; set; }
            /// <summary>
            /// 委托价格(三板报价委托) 
            /// </summary>
            public double entrust_price2 { get; set; }
        }

        ///<summary>
        ///功能号	333	版本号	3.7	更新日期	20090608
        ///功能名称	三板报价转让委托查询			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询委托
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此股票	（此错误可不作判断）
        ///-60	没有委托记录
        ///-61	查询委托失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">操作员分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别，如果不为空格，查确定的，为空，查所有。</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码，如果为空格，查所有，不为空，查确定的，此时exchange_type必须不为空</param>
        ///<param name="locate_entrust_no">指定委托号，查指定委托号的委托，且request_num为1，且前台在收到应答后要检查返回的委托的委托号是否与要求查询的一致，此时exchange_type和stock_code要为空串。</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="sort_direction">排序方式 '0' 正常 '1'倒序</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        ///<param name="action_in">操作确认，1，则只查询可以撤单的委托；0及其他，则查询全部委托</param>
        public List<ResultF333> F333三板报价转让委托查询(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_account, string stock_code, int locate_entrust_no, string query_direction, string sort_direction, int request_num, string position_str, int action_in)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 333);
            objComm.SetRange(16, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("locate_entrust_no");
            objComm.AddField("query_direction");
            objComm.AddField("sort_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddField("action_in");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(locate_entrust_no.ToString());
            objComm.AddValue(query_direction);
            objComm.AddValue(sort_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            objComm.AddValue(action_in.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF333> result = new List<ResultF333>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF333(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F334 三板报价转让委托撤单 的返回结果
        /// </summary>
        public class ResultF334
        {
            public ResultF334(Comm objComm)
            {
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
            }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
        }

        ///<summary>
        ///功能号	334	版本号	3.7	更新日期	20090608
        ///功能名称	三板报价转让委托撤单			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	委托撤单
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-53	无此委托	（包含此委托不是该股民的）
        ///-54	此委托不能撤单
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">客户分支号</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="batch_flag">批量标志 '0'--单笔 '1'--批量</param>
        ///<param name="exchange_type">交易类别,如果账号指定市场全撤的时候才必须输入。</param>
        ///<param name="entrust_no">委托编号,使用批量撤单标志batch_flag为‘1‘，则将理解为批号，其它为委托编号，如果为0，则如果批量标志为‘1’，那么批量撤单账号整个市场的。</param>
        public ResultF334 F334三板报价转让委托撤单(int op_branch_no, int branch_no, int fund_account, string password, string batch_flag, string exchange_type, int entrust_no)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 334);
            objComm.SetRange(10, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("batch_flag");
            objComm.AddField("exchange_type");
            objComm.AddField("entrust_no");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(batch_flag);
            objComm.AddValue(exchange_type);
            objComm.AddValue(entrust_no.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF334 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF334(objComm);
            }
            return result;

        }

        /// <summary>
        /// F400 查询行情 的返回结果
        /// </summary>
        public class ResultF400
        {
            public ResultF400(Comm objComm)
            {
                exchange_index = Convert.ToDouble(objComm.FieldByName("exchange_index"));
                last_price = Convert.ToDouble(objComm.FieldByName("last_price"));
                open_price = Convert.ToDouble(objComm.FieldByName("open_price"));
                close_price = Convert.ToDouble(objComm.FieldByName("close_price"));
                high_price = Convert.ToDouble(objComm.FieldByName("high_price"));
                low_price = Convert.ToDouble(objComm.FieldByName("low_price"));
                business_balance = Convert.ToDouble(objComm.FieldByName("business_balance"));
                business_amount = Convert.ToDouble(objComm.FieldByName("business_amount"));
                buy_price1 = Convert.ToDouble(objComm.FieldByName("buy_price1"));
                buy_price2 = Convert.ToDouble(objComm.FieldByName("buy_price2"));
                buy_price3 = Convert.ToDouble(objComm.FieldByName("buy_price3"));
                buy_price4 = Convert.ToDouble(objComm.FieldByName("buy_price4"));
                buy_price5 = Convert.ToDouble(objComm.FieldByName("buy_price5"));
                sale_price1 = Convert.ToDouble(objComm.FieldByName("sale_price1"));
                sale_price2 = Convert.ToDouble(objComm.FieldByName("sale_price2"));
                sale_price3 = Convert.ToDouble(objComm.FieldByName("sale_price3"));
                sale_price4 = Convert.ToDouble(objComm.FieldByName("sale_price4"));
                sale_price5 = Convert.ToDouble(objComm.FieldByName("sale_price5"));
                buy_amount1 = Convert.ToDouble(objComm.FieldByName("buy_amount1"));
                buy_amount2 = Convert.ToDouble(objComm.FieldByName("buy_amount2"));
                buy_amount3 = Convert.ToDouble(objComm.FieldByName("buy_amount3"));
                buy_amount4 = Convert.ToDouble(objComm.FieldByName("buy_amount4"));
                buy_amount5 = Convert.ToDouble(objComm.FieldByName("buy_amount5"));
                sale_amount1 = Convert.ToDouble(objComm.FieldByName("sale_amount1"));
                sale_amount2 = Convert.ToDouble(objComm.FieldByName("sale_amount2"));
                sale_amount3 = Convert.ToDouble(objComm.FieldByName("sale_amount3"));
                sale_amount4 = Convert.ToDouble(objComm.FieldByName("sale_amount4"));
                sale_amount5 = Convert.ToDouble(objComm.FieldByName("sale_amount5"));
                stock_interest = Convert.ToDouble(objComm.FieldByName("stock_interest"));
                stock_name = objComm.FieldByName("stock_name");
            }
            /// <summary>
            /// 交易指数 
            /// </summary>
            public double exchange_index { get; set; }
            /// <summary>
            /// 最新价 
            /// </summary>
            public double last_price { get; set; }
            /// <summary>
            /// 开盘价 
            /// </summary>
            public double open_price { get; set; }
            /// <summary>
            /// 收盘价 
            /// </summary>
            public double close_price { get; set; }
            /// <summary>
            /// 最高价 
            /// </summary>
            public double high_price { get; set; }
            /// <summary>
            /// 最低价 
            /// </summary>
            public double low_price { get; set; }
            /// <summary>
            /// 成交金额 
            /// </summary>
            public double business_balance { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double business_amount { get; set; }
            /// <summary>
            /// 申买价一 
            /// </summary>
            public double buy_price1 { get; set; }
            /// <summary>
            /// 申买价二 
            /// </summary>
            public double buy_price2 { get; set; }
            /// <summary>
            /// 申买价三 
            /// </summary>
            public double buy_price3 { get; set; }
            /// <summary>
            /// 申买价四 
            /// </summary>
            public double buy_price4 { get; set; }
            /// <summary>
            /// 申买价五 
            /// </summary>
            public double buy_price5 { get; set; }
            /// <summary>
            /// 申卖价一 
            /// </summary>
            public double sale_price1 { get; set; }
            /// <summary>
            /// 申卖价二 
            /// </summary>
            public double sale_price2 { get; set; }
            /// <summary>
            /// 申卖价三 
            /// </summary>
            public double sale_price3 { get; set; }
            /// <summary>
            /// 申卖价四 
            /// </summary>
            public double sale_price4 { get; set; }
            /// <summary>
            /// 申卖价五 
            /// </summary>
            public double sale_price5 { get; set; }
            /// <summary>
            /// 申买量一 
            /// </summary>
            public double buy_amount1 { get; set; }
            /// <summary>
            /// 申买量二 
            /// </summary>
            public double buy_amount2 { get; set; }
            /// <summary>
            /// 申买量三 
            /// </summary>
            public double buy_amount3 { get; set; }
            /// <summary>
            /// 申买量四 
            /// </summary>
            public double buy_amount4 { get; set; }
            /// <summary>
            /// 申买量五 
            /// </summary>
            public double buy_amount5 { get; set; }
            /// <summary>
            /// 申卖量一 
            /// </summary>
            public double sale_amount1 { get; set; }
            /// <summary>
            /// 申卖量二 
            /// </summary>
            public double sale_amount2 { get; set; }
            /// <summary>
            /// 申卖量三 
            /// </summary>
            public double sale_amount3 { get; set; }
            /// <summary>
            /// 申卖量四 
            /// </summary>
            public double sale_amount4 { get; set; }
            /// <summary>
            /// 申卖量五 
            /// </summary>
            public double sale_amount5 { get; set; }
            /// <summary>
            /// 国债百元利息额，如果不是国债，则小于零 
            /// </summary>
            public double stock_interest { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
        }

        ///<summary>
        ///功能号	400	版本号	3.7	更新日期	20090608
        ///功能名称	查询行情			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询行情
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此股票
        ///-61	查询行情失败
        ///修改记录
        ///</summary>
        ///<param name="exchange_type">交易类别</param>
        ///<param name="stock_code">证券代码</param>
        public List<ResultF400> F400查询行情(string exchange_type, string stock_code)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 400);
            objComm.SetRange(3, 1);
            objComm.AddField("version");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_code");
            objComm.AddValue(version.ToString());
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_code);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF400> result = new List<ResultF400>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF400(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F401 查询委托 的返回结果
        /// </summary>
        public class ResultF401
        {
            public ResultF401(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_bs = objComm.FieldByName("entrust_bs");
                bs_name = objComm.FieldByName("bs_name");
                entrust_price = Convert.ToDouble(objComm.FieldByName("entrust_price"));
                entrust_amount = Convert.ToDouble(objComm.FieldByName("entrust_amount"));
                business_amount = Convert.ToDouble(objComm.FieldByName("business_amount"));
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                report_no = Convert.ToInt32(objComm.FieldByName("report_no"));
                report_time = Convert.ToInt32(objComm.FieldByName("report_time"));
                entrust_type = objComm.FieldByName("entrust_type");
                type_name = objComm.FieldByName("type_name");
                entrust_status = objComm.FieldByName("entrust_status");
                status_name = objComm.FieldByName("status_name");
                cancel_info = objComm.FieldByName("cancel_info");
                entrust_prop = objComm.FieldByName("entrust_prop");
                entrust_prop_name = objComm.FieldByName("entrust_prop_name");
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 委托序号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 买卖方向名称 
            /// </summary>
            public string bs_name { get; set; }
            /// <summary>
            /// 委托价格 
            /// </summary>
            public double entrust_price { get; set; }
            /// <summary>
            /// 委托数量 
            /// </summary>
            public double entrust_amount { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double business_amount { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 申报号 
            /// </summary>
            public int report_no { get; set; }
            /// <summary>
            /// 申报时间 
            /// </summary>
            public int report_time { get; set; }
            /// <summary>
            /// 委托类别 
            /// </summary>
            public string entrust_type { get; set; }
            /// <summary>
            /// 委托类别名称 
            /// </summary>
            public string type_name { get; set; }
            /// <summary>
            /// 委托状态 
            /// </summary>
            public string entrust_status { get; set; }
            /// <summary>
            /// 状态名称 
            /// </summary>
            public string status_name { get; set; }
            /// <summary>
            /// 废单原因 
            /// </summary>
            public string cancel_info { get; set; }
            /// <summary>
            /// 委托属性 
            /// </summary>
            public string entrust_prop { get; set; }
            /// <summary>
            /// 委托属性 
            /// </summary>
            public string entrust_prop_name { get; set; }
        }

        ///<summary>
        ///功能号	401	版本号	3.7	更新日期	20090608
        ///功能名称	查询委托			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询委托
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此股票	（此错误可不作判断）
        ///-60	没有委托记录
        ///-61	查询委托失败	（其他错误）
        ///修改记录	V3.7 20081231 张国强 增加输入参数query_type(是否查委托类型为撤单的委托)，0全部(默认)；1不查委托类型为撤单的委托
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">操作员分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别，如果不为空格，查确定的，为空，查所有。</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码，如果为空格，查所有，不为空，查确定的，此时exchange_type必须不为空</param>
        ///<param name="locate_entrust_no">指定委托号，查指定委托号的委托，且request_num为1，且前台在收到应答后要检查返回的委托的委托号是否与要求查询的一致，此时exchange_type和stock_code要为空串。</param>
        ///<param name="query_type">查询类别，是否查委托类型为撤单的委托，0全部(默认)；1不查委托类型为撤单的委托</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="sort_direction">排序方式 '0' 正常 '1'倒序</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        ///<param name="action_in">操作确认，1，则只查询可以撤单的委托；0及其他，则查询全部委托</param>
        public List<ResultF401> F401查询委托(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_account, string stock_code, int locate_entrust_no, string query_type, string query_direction, string sort_direction, int request_num, string position_str, int action_in)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 401);
            objComm.SetRange(17, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("locate_entrust_no");
            objComm.AddField("query_type");
            objComm.AddField("query_direction");
            objComm.AddField("sort_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddField("action_in");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(locate_entrust_no.ToString());
            objComm.AddValue(query_type);
            objComm.AddValue(query_direction);
            objComm.AddValue(sort_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            objComm.AddValue(action_in.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF401> result = new List<ResultF401>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF401(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F402 查询成交 的返回结果
        /// </summary>
        public class ResultF402
        {
            public ResultF402(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
                date = Convert.ToInt32(objComm.FieldByName("date"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_bs = objComm.FieldByName("entrust_bs");
                bs_name = objComm.FieldByName("bs_name");
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                business_amount = Convert.ToDouble(objComm.FieldByName("business_amount"));
                business_time = Convert.ToInt32(objComm.FieldByName("business_time"));
                business_status = objComm.FieldByName("business_status");
                status_name = objComm.FieldByName("status_name");
                business_type = objComm.FieldByName("business_type");
                type_name = objComm.FieldByName("type_name");
                business_times = Convert.ToInt32(objComm.FieldByName("business_times"));
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                report_no = Convert.ToInt32(objComm.FieldByName("report_no"));
                business_balance = Convert.ToDouble(objComm.FieldByName("business_balance"));
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 流水号（暂不使用） 
            /// </summary>
            public int serial_no { get; set; }
            /// <summary>
            /// 日期 
            /// </summary>
            public int date { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 买卖方向名称 
            /// </summary>
            public string bs_name { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double business_amount { get; set; }
            /// <summary>
            /// 成交时间 
            /// </summary>
            public int business_time { get; set; }
            /// <summary>
            /// 成交状态0：‘成交’，2：‘废单’4：‘确认’ 
            /// </summary>
            public string business_status { get; set; }
            /// <summary>
            /// 成交状态名称 
            /// </summary>
            public string status_name { get; set; }
            /// <summary>
            /// 成交类别，0：‘买卖’2：‘撤单’ 
            /// </summary>
            public string business_type { get; set; }
            /// <summary>
            /// 成交类别名称 
            /// </summary>
            public string type_name { get; set; }
            /// <summary>
            /// 成交笔数 
            /// </summary>
            public int business_times { get; set; }
            /// <summary>
            /// 合同号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 申报号 
            /// </summary>
            public int report_no { get; set; }
            /// <summary>
            /// 成交金额 
            /// </summary>
            public double business_balance { get; set; }
        }

        ///<summary>
        ///功能号	402	版本号	3.7	更新日期	20090608
        ///功能名称	查询成交			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询成交
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此股票	（此错误可不作判断）
        ///-60	没有成交记录
        ///-61	查询成交失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别，不为空，查确定的，为空，查所有</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码，为空，查所有，不为空，查确定的，此时exchange_type必须不为空</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="query_mode">查询模式 '0' 明细 '1' 委托合并 '2' 证券汇总 '3' 按资金帐号汇总</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF402> F402查询成交(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_account, string stock_code, string query_direction, string query_mode, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 402);
            objComm.SetRange(14, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("query_direction");
            objComm.AddField("query_mode");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(query_direction);
            objComm.AddValue(query_mode);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF402> result = new List<ResultF402>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF402(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F403 查询股票 的返回结果
        /// </summary>
        public class ResultF403
        {
            public ResultF403(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                current_amount = Convert.ToDouble(objComm.FieldByName("current_amount"));
                enable_amount = Convert.ToDouble(objComm.FieldByName("enable_amount"));
                last_price = Convert.ToDouble(objComm.FieldByName("last_price"));
                cost_price = Convert.ToDouble(objComm.FieldByName("cost_price"));
                income_balance = Convert.ToDouble(objComm.FieldByName("income_balance"));
                hand_flag = objComm.FieldByName("hand_flag");
                market_value = Convert.ToDouble(objComm.FieldByName("market_value"));
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 当前数量 
            /// </summary>
            public double current_amount { get; set; }
            /// <summary>
            /// 可卖股票 
            /// </summary>
            public double enable_amount { get; set; }
            /// <summary>
            /// 最新价 
            /// </summary>
            public double last_price { get; set; }
            /// <summary>
            /// 成本价 
            /// </summary>
            public double cost_price { get; set; }
            /// <summary>
            /// 买卖盈亏 
            /// </summary>
            public double income_balance { get; set; }
            /// <summary>
            /// 股手标志，'0'--股   '1' -- 手。 
            /// </summary>
            public string hand_flag { get; set; }
            /// <summary>
            /// 证券市值，在明细下为每个股东帐号的市值，而在汇总下则为fund_account的，汇总下无stock_account。 
            /// </summary>
            public double market_value { get; set; }
        }

        ///<summary>
        ///功能号	403	版本号	3.7	更新日期	20090608
        ///功能名称	查询股票			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询股票
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此股票	（此错误可不作判断）
        ///-60	没有股票记录
        ///-61	查询股票失败	（其他错误）
        ///修改记录	V3.7 20080201 张国强 应广发要求，增加av_buy_price和av_income_balance的输出
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别，不为空，查确定的，为空，查所有。</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码，为空，查所有，不为空，查确定的，此时exchange_type必须不为空。</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="query_mode">0 明细 1 汇总</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串，汇总查询时为exchange_type+stock_code，明细查询时为branch_no+exchange_type+stock_account+stock_code总长度为24个字节。</param>
        public List<ResultF403> F403查询股票(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_account, string stock_code, string query_direction, string query_mode, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 403);
            objComm.SetRange(14, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("query_direction");
            objComm.AddField("query_mode");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(query_direction);
            objComm.AddValue(query_mode);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF403> result = new List<ResultF403>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF403(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F404 查询资金流水 的返回结果
        /// </summary>
        public class ResultF404
        {
            public ResultF404(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
                business_date = Convert.ToInt32(objComm.FieldByName("business_date"));
                business_flag = Convert.ToInt32(objComm.FieldByName("business_flag"));
                business_name = objComm.FieldByName("business_name");
                money_type = objComm.FieldByName("money_type");
                occur_balance = Convert.ToDouble(objComm.FieldByName("occur_balance"));
                post_balance = Convert.ToDouble(objComm.FieldByName("post_balance"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_bs = objComm.FieldByName("entrust_bs");
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                business_amount = Convert.ToDouble(objComm.FieldByName("business_amount"));
                remark = objComm.FieldByName("remark");
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
            /// <summary>
            /// 发生日期 
            /// </summary>
            public int business_date { get; set; }
            /// <summary>
            /// 业务标志 
            /// </summary>
            public int business_flag { get; set; }
            /// <summary>
            /// 业务标志名称 
            /// </summary>
            public string business_name { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 发生金额，取正负 
            /// </summary>
            public double occur_balance { get; set; }
            /// <summary>
            /// 发生后余额 
            /// </summary>
            public double post_balance { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double business_amount { get; set; }
            /// <summary>
            /// 备注 
            /// </summary>
            public string remark { get; set; }
        }

        ///<summary>
        ///功能号	404	版本号	3.7	更新日期	20090608
        ///功能名称	查询资金流水			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询资金流水
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	没有资金流水
        ///-61	查询流水失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="money_type">币种类别</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF404> F404查询资金流水(int op_branch_no, int branch_no, int fund_account, string password, string money_type, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 404);
            objComm.SetRange(11, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("money_type");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(money_type);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF404> result = new List<ResultF404>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF404(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F405 查询资金 的返回结果
        /// </summary>
        public class ResultF405
        {
            public ResultF405(Comm objComm)
            {
                money_type = objComm.FieldByName("money_type");
                current_balance = Convert.ToDouble(objComm.FieldByName("current_balance"));
                enable_balance = Convert.ToDouble(objComm.FieldByName("enable_balance"));
                fetch_balance = Convert.ToDouble(objComm.FieldByName("fetch_balance"));
                interest = Convert.ToDouble(objComm.FieldByName("interest"));
                asset_balance = Convert.ToDouble(objComm.FieldByName("asset_balance"));
                fetch_cash = Convert.ToDouble(objComm.FieldByName("fetch_cash"));
                fund_balance = Convert.ToDouble(objComm.FieldByName("fund_balance"));
                market_value = Convert.ToDouble(objComm.FieldByName("market_value"));
                opfund_market_value = Convert.ToDouble(objComm.FieldByName("opfund_market_value"));
                pre_interest = Convert.ToDouble(objComm.FieldByName("pre_interest"));
            }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 当前余额 
            /// </summary>
            public double current_balance { get; set; }
            /// <summary>
            /// 可用金额 
            /// </summary>
            public double enable_balance { get; set; }
            /// <summary>
            /// 可取金额 
            /// </summary>
            public double fetch_balance { get; set; }
            /// <summary>
            /// 待入账利息 
            /// </summary>
            public double interest { get; set; }
            /// <summary>
            /// 资产总值（不含基金市值） 
            /// </summary>
            public double asset_balance { get; set; }
            /// <summary>
            /// 可取现金 
            /// </summary>
            public double fetch_cash { get; set; }
            /// <summary>
            /// 资金（= 资产总值 - 证券市值） 
            /// </summary>
            public double fund_balance { get; set; }
            /// <summary>
            /// 证券市值 
            /// </summary>
            public double market_value { get; set; }
            /// <summary>
            /// 基金市值 
            /// </summary>
            public double opfund_market_value { get; set; }
            /// <summary>
            /// 预计利息 
            /// </summary>
            public double pre_interest { get; set; }
        }

        ///<summary>
        ///功能号	405	版本号	3.7	更新日期	20080708
        ///功能名称	查询资金			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询资金
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	查询资金失败	（其他错误）
        ///修改记录	V3.7 20080708 张国强 增加输出参数opfund_market_value开基市值，注意原输出参数asset_balance不包括开基市值
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="money_type">币种类别</param>
        public List<ResultF405> F405查询资金(int op_branch_no, int branch_no, int fund_account, string password, string money_type)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 405);
            objComm.SetRange(8, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("money_type");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(money_type);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF405> result = new List<ResultF405>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF405(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F406 查询配号 的返回结果
        /// </summary>
        public class ResultF406
        {
            public ResultF406(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
                occur_amount = Convert.ToDouble(objComm.FieldByName("occur_amount"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_code = objComm.FieldByName("stock_code");
                remark = objComm.FieldByName("remark");
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
            /// <summary>
            /// 买入的数量 
            /// </summary>
            public double occur_amount { get; set; }
            /// <summary>
            /// 市场类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 股票标识 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 配号存放在里，多个配号用’|’隔开。 
            /// </summary>
            public string remark { get; set; }
        }

        ///<summary>
        ///功能号	406	版本号	3.7	更新日期	20090608
        ///功能名称	查询配号			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询配号
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此申购代码	（此错误可不作判断）
        ///-60	没有配号记录
        ///-61	查询失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="start_date">起始日期, 必须输入。</param>
        ///<param name="end_date">结束日期</param>
        ///<param name="exchange_type">交易类别, 可为空, 查所有。</param>
        ///<param name="stock_account">证券账号, 可为空, 查所有。</param>
        ///<param name="stock_code">证券代码, 可为空, 查所有。</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF406> F406查询配号(int op_branch_no, int branch_no, int fund_account, string password, int start_date, int end_date, string exchange_type, string stock_account, string stock_code, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 406);
            objComm.SetRange(15, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF406> result = new List<ResultF406>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF406(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F407 查询股东 的返回结果
        /// </summary>
        public class ResultF407
        {
            public ResultF407(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                exchange_type = objComm.FieldByName("exchange_type");
                exchange_name = objComm.FieldByName("exchange_name");
                stock_account = objComm.FieldByName("stock_account");
                holder_status = objComm.FieldByName("holder_status");
                holder_rights = objComm.FieldByName("holder_rights");
                main_flag = objComm.FieldByName("main_flag");
                register = objComm.FieldByName("register");
                seat_no = objComm.FieldByName("seat_no");
                enable_amount = Convert.ToDouble(objComm.FieldByName("enable_amount"));
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 交易名称 
            /// </summary>
            public string exchange_name { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 股东状态,‘0’为正常，其他为不正常； 
            /// </summary>
            public string holder_status { get; set; }
            /// <summary>
            /// 股东权限 '0': 自动配股，'1':  自动配售 '2': 红利领取 'P': 代理配售申购 'D': 代理缴款 'G': 代理转配 'H': 代理转让 'I': 代理转转 'K': 代理申购 'n': ETF申购 'r': 买断回购 'g': 权证交易 
            /// </summary>
            public string holder_rights { get; set; }
            /// <summary>
            /// 主副标志,为‘1’为主帐号。 
            /// </summary>
            public string main_flag { get; set; }
            /// <summary>
            /// 指定标志,‘0’未指定 ‘1’指定 
            /// </summary>
            public string register { get; set; }
            /// <summary>
            /// 席位号（增加） 
            /// </summary>
            public string seat_no { get; set; }
            /// <summary>
            /// 可卖数量 
            /// </summary>
            public double enable_amount { get; set; }
        }

        ///<summary>
        ///功能号	407	版本号	3.7	更新日期	20090608
        ///功能名称	查询股东			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询股东
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	查询帐号失败	（包含所有错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别，可为空，查所有。</param>
        ///<param name="stock_code">证券代码，可为空，若输入则输出所有持有该证券的股东</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF407> F407查询股东(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_code, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 407);
            objComm.SetRange(12, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_code");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_code);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF407> result = new List<ResultF407>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF407(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F408 查询债券质押在库余额 的返回结果
        /// </summary>
        public class ResultF408
        {
            public ResultF408(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                exchange_type = objComm.FieldByName("exchange_type");
                exchange_name = objComm.FieldByName("exchange_name");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                store_amount = Convert.ToDouble(objComm.FieldByName("store_amount"));
                pre_out_amount = Convert.ToDouble(objComm.FieldByName("pre_out_amount"));
                pre_in_amount = Convert.ToDouble(objComm.FieldByName("pre_in_amount"));
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 交易名称 
            /// </summary>
            public string exchange_name { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 交易所库存数量 
            /// </summary>
            public double store_amount { get; set; }
            /// <summary>
            /// 交易期间出库数量 
            /// </summary>
            public double pre_out_amount { get; set; }
            /// <summary>
            /// 交易期间入库数量 
            /// </summary>
            public double pre_in_amount { get; set; }
        }

        ///<summary>
        ///功能号	408	版本号	3.7	更新日期	20090608
        ///功能名称	查询债券质押在库余额			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询债券质押在库余额
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此证券	（此错误可不作判断）
        ///-60	无证券记录
        ///-61	查询帐号失败	（包含所有错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">柜台资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码，输入则输出所有股东的该股票的持仓</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF408> F408查询债券质押在库余额(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_account, string stock_code, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 408);
            objComm.SetRange(13, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF408> result = new List<ResultF408>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF408(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F411 查询历史成交 的返回结果
        /// </summary>
        public class ResultF411
        {
            public ResultF411(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                date = Convert.ToInt32(objComm.FieldByName("date"));
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
                exchange_type = objComm.FieldByName("exchange_type");
                exchange_name = objComm.FieldByName("exchange_name");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_bs = objComm.FieldByName("entrust_bs");
                bs_name = objComm.FieldByName("bs_name");
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                business_time = Convert.ToInt32(objComm.FieldByName("business_time"));
                business_status = objComm.FieldByName("business_status");
                status_name = objComm.FieldByName("status_name");
                business_times = Convert.ToInt32(objComm.FieldByName("business_times"));
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                report_no = Convert.ToInt32(objComm.FieldByName("report_no"));
                occur_amount = Convert.ToDouble(objComm.FieldByName("occur_amount"));
                business_balance = Convert.ToDouble(objComm.FieldByName("business_balance"));
                occur_balance = Convert.ToDouble(objComm.FieldByName("occur_balance"));
                post_balance = Convert.ToDouble(objComm.FieldByName("post_balance"));
                post_amount = Convert.ToDouble(objComm.FieldByName("post_amount"));
                fare0 = Convert.ToDouble(objComm.FieldByName("fare0"));
                fare1 = Convert.ToDouble(objComm.FieldByName("fare1"));
                fare2 = Convert.ToDouble(objComm.FieldByName("fare2"));
                fare3 = Convert.ToDouble(objComm.FieldByName("fare3"));
                farex = Convert.ToDouble(objComm.FieldByName("farex"));
                remark = objComm.FieldByName("remark");
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 发生日期 
            /// </summary>
            public int date { get; set; }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 交易名称 
            /// </summary>
            public string exchange_name { get; set; }
            /// <summary>
            /// 证券账号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 股票标识 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 股票名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 买卖方向名称 
            /// </summary>
            public string bs_name { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 成交时间 
            /// </summary>
            public int business_time { get; set; }
            /// <summary>
            /// 成交状态 
            /// </summary>
            public string business_status { get; set; }
            /// <summary>
            /// 成交状态名称 
            /// </summary>
            public string status_name { get; set; }
            /// <summary>
            /// 成交笔数 
            /// </summary>
            public int business_times { get; set; }
            /// <summary>
            /// 合同号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 申报号 
            /// </summary>
            public int report_no { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double occur_amount { get; set; }
            /// <summary>
            /// 成交金额 
            /// </summary>
            public double business_balance { get; set; }
            /// <summary>
            /// 清算金额 
            /// </summary>
            public double occur_balance { get; set; }
            /// <summary>
            /// 后资金额 
            /// </summary>
            public double post_balance { get; set; }
            /// <summary>
            /// 股票余额 
            /// </summary>
            public double post_amount { get; set; }
            /// <summary>
            /// 佣金 
            /// </summary>
            public double fare0 { get; set; }
            /// <summary>
            /// 印花税 
            /// </summary>
            public double fare1 { get; set; }
            /// <summary>
            /// 过户费 
            /// </summary>
            public double fare2 { get; set; }
            /// <summary>
            /// 费用3 
            /// </summary>
            public double fare3 { get; set; }
            /// <summary>
            /// 费用x 
            /// </summary>
            public double farex { get; set; }
            /// <summary>
            /// 备注 
            /// </summary>
            public string remark { get; set; }
        }

        ///<summary>
        ///功能号	411	版本号	3.7	更新日期	20090608
        ///功能名称	查询历史成交			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询历史成交
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此股票	（此错误可不作判断）
        ///-60	没有历史成交记录
        ///-61	查询历史成交失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="start_date">起始日期</param>
        ///<param name="end_date">结束日期</param>
        ///<param name="exchange_type">交易类别</param>
        ///<param name="stock_account">证券账号</param>
        ///<param name="stock_code">证券代码</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF411> F411查询历史成交(int op_branch_no, int branch_no, int fund_account, string password, int start_date, int end_date, string exchange_type, string stock_account, string stock_code, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 411);
            objComm.SetRange(15, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF411> result = new List<ResultF411>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF411(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F412 查询历史资金证券流水 的返回结果
        /// </summary>
        public class ResultF412
        {
            public ResultF412(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
                business_date = Convert.ToInt32(objComm.FieldByName("business_date"));
                business_flag = Convert.ToInt32(objComm.FieldByName("business_flag"));
                business_name = objComm.FieldByName("business_name");
                money_type = objComm.FieldByName("money_type");
                occur_balance = Convert.ToDouble(objComm.FieldByName("occur_balance"));
                post_balance = Convert.ToDouble(objComm.FieldByName("post_balance"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_bs = objComm.FieldByName("entrust_bs");
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                occur_amount = Convert.ToDouble(objComm.FieldByName("occur_amount"));
                remark = objComm.FieldByName("remark");
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
            /// <summary>
            /// 交易日期 
            /// </summary>
            public int business_date { get; set; }
            /// <summary>
            /// 业务标志 
            /// </summary>
            public int business_flag { get; set; }
            /// <summary>
            /// 业务名称 
            /// </summary>
            public string business_name { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 资金发生额 
            /// </summary>
            public double occur_balance { get; set; }
            /// <summary>
            /// 资金本次余额 
            /// </summary>
            public double post_balance { get; set; }
            /// <summary>
            /// 市场类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 股东代码 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 股票标识 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 股票名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 发生数量 
            /// </summary>
            public double occur_amount { get; set; }
            /// <summary>
            /// 备注 
            /// </summary>
            public string remark { get; set; }
        }

        ///<summary>
        ///功能号	412	版本号	3.7	更新日期	20090608
        ///功能名称	查询历史资金证券流水			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询历史资金证券流水
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	没有资金流水
        ///-61	取历史资金证券流水失败
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="start_date">起始日期</param>
        ///<param name="end_date">结束日期</param>
        ///<param name="money_type">币种类别</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF412> F412查询历史资金证券流水(int op_branch_no, int branch_no, int fund_account, string password, int start_date, int end_date, string money_type, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 412);
            objComm.SetRange(13, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("money_type");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(money_type);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF412> result = new List<ResultF412>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF412(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F413 查批量委托 的返回结果
        /// </summary>
        public class ResultF413
        {
            public ResultF413(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                batch_no = Convert.ToInt32(objComm.FieldByName("batch_no"));
                date = Convert.ToInt32(objComm.FieldByName("date"));
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                report_no = Convert.ToInt32(objComm.FieldByName("report_no"));
                fund_account = Convert.ToInt32(objComm.FieldByName("fund_account"));
                exchange_type = objComm.FieldByName("exchange_type");
                seat_no = objComm.FieldByName("seat_no");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                bank_no = objComm.FieldByName("bank_no");
                money_type = objComm.FieldByName("money_type");
                entrust_way = objComm.FieldByName("entrust_way");
                entrust_type = objComm.FieldByName("entrust_type");
                entrust_prop = objComm.FieldByName("entrust_prop");
                entrust_bs = objComm.FieldByName("entrust_bs");
                bs_name = objComm.FieldByName("bs_name");
                entrust_amount = Convert.ToDouble(objComm.FieldByName("entrust_amount"));
                entrust_price = Convert.ToDouble(objComm.FieldByName("entrust_price"));
                entrust_status = objComm.FieldByName("entrust_status");
                entrust_name = objComm.FieldByName("entrust_name");
                business_amount = Convert.ToDouble(objComm.FieldByName("business_amount"));
                business_balance = Convert.ToDouble(objComm.FieldByName("business_balance"));
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                entrust_date = Convert.ToInt32(objComm.FieldByName("entrust_date"));
                entrust_time = Convert.ToInt32(objComm.FieldByName("entrust_time"));
                report_time = Convert.ToInt32(objComm.FieldByName("report_time"));
                entrust_num = Convert.ToInt32(objComm.FieldByName("entrust_num"));
                position_str = objComm.FieldByName("position_str");
            }
            /// <summary>
            /// 客户网点 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 委托批号 
            /// </summary>
            public int batch_no { get; set; }
            /// <summary>
            /// 当前日期 
            /// </summary>
            public int date { get; set; }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 申请编号 
            /// </summary>
            public int report_no { get; set; }
            /// <summary>
            /// 资金帐号 
            /// </summary>
            public int fund_account { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 席位编号 
            /// </summary>
            public string seat_no { get; set; }
            /// <summary>
            /// 证券帐号 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 证券代码 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 证券名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 银行编号 
            /// </summary>
            public string bank_no { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 委托方式 
            /// </summary>
            public string entrust_way { get; set; }
            /// <summary>
            /// 委托类别 
            /// </summary>
            public string entrust_type { get; set; }
            /// <summary>
            /// 委托属性 
            /// </summary>
            public string entrust_prop { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 买卖方向名称 
            /// </summary>
            public string bs_name { get; set; }
            /// <summary>
            /// 委托数量 
            /// </summary>
            public double entrust_amount { get; set; }
            /// <summary>
            /// 委托价格 
            /// </summary>
            public double entrust_price { get; set; }
            /// <summary>
            /// 委托状态 
            /// </summary>
            public string entrust_status { get; set; }
            /// <summary>
            /// 委托状态名称 
            /// </summary>
            public string entrust_name { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double business_amount { get; set; }
            /// <summary>
            /// 成交金额 
            /// </summary>
            public double business_balance { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 委托日期 
            /// </summary>
            public int entrust_date { get; set; }
            /// <summary>
            /// 委托时间 
            /// </summary>
            public int entrust_time { get; set; }
            /// <summary>
            /// 申报时间 
            /// </summary>
            public int report_time { get; set; }
            /// <summary>
            /// 委托笔数 
            /// </summary>
            public int entrust_num { get; set; }
            /// <summary>
            /// 定位串，合并模式为批号，明细模式为委托号 
            /// </summary>
            public string position_str { get; set; }
        }

        ///<summary>
        ///功能号	413	版本号	3.7	更新日期	20090608
        ///功能名称	查批量委托			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查批量委托
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	没有委托记录
        ///-61	查批量委托失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金帐号，必须指定</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别，可以为空查询全部</param>
        ///<param name="stock_account">证券帐号，可以为空查询全部</param>
        ///<param name="stock_code">证券代码，可以为空查询全部</param>
        ///<param name="entrust_no">委托批号,查询定位串</param>
        ///<param name="locate_entrust_no">合并模式的委托号查询定位串</param>
        ///<param name="query_direction">查询方向，‘0’合并模式按批号逆序，明细模式按委托号逆序‘1’合并模式按批号顺序，明细模式按委托号顺序</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        public List<ResultF413> F413查批量委托(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string stock_account, string stock_code, int entrust_no, int locate_entrust_no, string query_direction, int request_num)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 413);
            objComm.SetRange(14, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("entrust_no");
            objComm.AddField("locate_entrust_no");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(entrust_no.ToString());
            objComm.AddValue(locate_entrust_no.ToString());
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF413> result = new List<ResultF413>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF413(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F414 查询中签 的返回结果
        /// </summary>
        public class ResultF414
        {
            public ResultF414(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                date = Convert.ToInt32(objComm.FieldByName("date"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_code = objComm.FieldByName("stock_code");
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                occur_amount = Convert.ToDouble(objComm.FieldByName("occur_amount"));
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 发生日期 
            /// </summary>
            public int date { get; set; }
            /// <summary>
            /// 市场类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 股票标识 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 发生数量 
            /// </summary>
            public double occur_amount { get; set; }
        }

        ///<summary>
        ///功能号	414	版本号	3.7	更新日期	20090608
        ///功能名称	查询中签			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询中签
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-52	无此申购代码	（此错误可不作判断）
        ///-60	没有中签记录
        ///-61	查询中签失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="start_date">起始日期，必须输入</param>
        ///<param name="end_date">结束日期，必须输入</param>
        ///<param name="exchange_type">交易类别，可为空, 查所有。</param>
        ///<param name="stock_account">证券账号，可为空, 查所有。</param>
        ///<param name="stock_code">证券代码，可为空, 查所有。</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF414> F414查询中签(int op_branch_no, int branch_no, int fund_account, string password, int start_date, int end_date, string exchange_type, string stock_account, string stock_code, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 414);
            objComm.SetRange(14, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("exchange_type");
            objComm.AddField("stock_account");
            objComm.AddField("stock_code");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(exchange_type);
            objComm.AddValue(stock_account);
            objComm.AddValue(stock_code);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF414> result = new List<ResultF414>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF414(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F415 查询客户信息 的返回结果
        /// </summary>
        public class ResultF415
        {
            public ResultF415(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                client_name = objComm.FieldByName("client_name");
                fund_card = objComm.FieldByName("fund_card");
                id_kind = objComm.FieldByName("id_kind");
                id_no = objComm.FieldByName("id_no");
                last_name = objComm.FieldByName("last_name");
                mail_name = objComm.FieldByName("mail_name");
                zipcode = objComm.FieldByName("zipcode");
                address = objComm.FieldByName("address");
                id_address = objComm.FieldByName("id_address");
                phonecode = objComm.FieldByName("phonecode");
                mobiletelephone = objComm.FieldByName("mobiletelephone");
                beeppager = objComm.FieldByName("beeppager");
                fax = objComm.FieldByName("fax");
                e_mail = objComm.FieldByName("e_mail");
                risk_info = objComm.FieldByName("risk_info");
                risk_name = objComm.FieldByName("risk_name");
                account_data = objComm.FieldByName("account_data");
                account_data_name = objComm.FieldByName("account_data_name");
                organ_prop = objComm.FieldByName("organ_prop");
                organ_name = objComm.FieldByName("organ_name");
                client_group = objComm.FieldByName("client_group");
                group_name = objComm.FieldByName("group_name");
                profit_flag = objComm.FieldByName("profit_flag");
                home_tel = objComm.FieldByName("home_tel");
            }
            /// <summary>
            /// 分支代码 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 客户姓名 
            /// </summary>
            public string client_name { get; set; }
            /// <summary>
            /// 资金卡号 
            /// </summary>
            public string fund_card { get; set; }
            /// <summary>
            /// 证件类别,0 身份证 1 护照 2 营业执照 
            /// </summary>
            public string id_kind { get; set; }
            /// <summary>
            /// 证件号码 
            /// </summary>
            public string id_no { get; set; }
            /// <summary>
            /// 投资人户名 
            /// </summary>
            public string last_name { get; set; }
            /// <summary>
            /// 联系人 
            /// </summary>
            public string mail_name { get; set; }
            /// <summary>
            /// 邮政编码 
            /// </summary>
            public string zipcode { get; set; }
            /// <summary>
            /// 联系地址 
            /// </summary>
            public string address { get; set; }
            /// <summary>
            /// 身份证地址 
            /// </summary>
            public string id_address { get; set; }
            /// <summary>
            /// 联系电话 
            /// </summary>
            public string phonecode { get; set; }
            /// <summary>
            /// 移动电话 
            /// </summary>
            public string mobiletelephone { get; set; }
            /// <summary>
            /// 传呼号码 
            /// </summary>
            public string beeppager { get; set; }
            /// <summary>
            /// 传真号码 
            /// </summary>
            public string fax { get; set; }
            /// <summary>
            /// 电子信箱 
            /// </summary>
            public string e_mail { get; set; }
            /// <summary>
            /// 风险要素信息 
            /// </summary>
            public string risk_info { get; set; }
            /// <summary>
            /// 风险要素信息含义 
            /// </summary>
            public string risk_name { get; set; }
            /// <summary>
            /// 开户规范信息 
            /// </summary>
            public string account_data { get; set; }
            /// <summary>
            /// 开户规范信息含义 
            /// </summary>
            public string account_data_name { get; set; }
            /// <summary>
            /// 机构标志 
            /// </summary>
            public string organ_prop { get; set; }
            /// <summary>
            /// 机构标志名称 
            /// </summary>
            public string organ_name { get; set; }
            /// <summary>
            /// 客户分类 
            /// </summary>
            public string client_group { get; set; }
            /// <summary>
            /// 客户分类名称 
            /// </summary>
            public string group_name { get; set; }
            /// <summary>
            /// 盈亏计算方式 
            /// </summary>
            public string profit_flag { get; set; }
            /// <summary>
            /// 联系电话 
            /// </summary>
            public string home_tel { get; set; }
        }

        ///<summary>
        ///功能号	415	版本号	3.7	更新日期	20080708
        ///功能名称	查询客户信息			结果集返回	N
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询客户信息
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	无此客户
        ///-61	查询客户信息失败	（其他错误）
        ///-62	客户密码错误
        ///修改记录	V3.7 20081118 张国强 增加输出参数盈亏计算方式profit_flag, 联系电话home_tel
        ///V3.7 20080708 张国强 增加输出参数client_group（客户分类），group_name（客户分类名称），organ_prop（机构标志）和organ_name（机构名称）
        ///V3.7 20090608 张国强 增加输出参数account_data和account_data_name，支持开户规范信息的返回
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码, 必须输入</param>
        ///<param name="fund_account">资金账号, 必须输入</param>
        ///<param name="password">交易密码, 必须输入</param>
        public ResultF415 F415查询客户信息(int op_branch_no, int branch_no, int fund_account, string password)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 415);
            objComm.SetRange(7, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF415 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF415(objComm);
            }
            return result;

        }

        /// <summary>
        /// F416 查询历史资金证券流水详细信息 的返回结果
        /// </summary>
        public class ResultF416
        {
            public ResultF416(Comm objComm)
            {
                date = Convert.ToInt32(objComm.FieldByName("date"));
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
                business_flag = Convert.ToInt32(objComm.FieldByName("business_flag"));
                business_name = objComm.FieldByName("business_name");
                occur_balance = Convert.ToDouble(objComm.FieldByName("occur_balance"));
                post_balance = Convert.ToDouble(objComm.FieldByName("post_balance"));
                exchange_type = objComm.FieldByName("exchange_type");
                exchange_name = objComm.FieldByName("exchange_name");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                occur_amount = Convert.ToDouble(objComm.FieldByName("occur_amount"));
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                money_type = objComm.FieldByName("money_type");
                remark = objComm.FieldByName("remark");
                position_str = objComm.FieldByName("position_str");
                business_balance = Convert.ToDouble(objComm.FieldByName("business_balance"));
                fare0 = Convert.ToDouble(objComm.FieldByName("fare0"));
                fare1 = Convert.ToDouble(objComm.FieldByName("fare1"));
                fare2 = Convert.ToDouble(objComm.FieldByName("fare2"));
                fare3 = Convert.ToDouble(objComm.FieldByName("fare3"));
                farex = Convert.ToDouble(objComm.FieldByName("farex"));
                std_fare0 = Convert.ToDouble(objComm.FieldByName("std_fare0"));
                remark2 = objComm.FieldByName("remark2");
                entrust_bs = objComm.FieldByName("entrust_bs");
                entrust_date = Convert.ToInt32(objComm.FieldByName("entrust_date"));
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                report_no = Convert.ToInt32(objComm.FieldByName("report_no"));
                report_time = Convert.ToInt32(objComm.FieldByName("report_time"));
                business_no = Convert.ToInt32(objComm.FieldByName("business_no"));
                business_time = Convert.ToInt32(objComm.FieldByName("business_time"));
                business_time2 = Convert.ToInt32(objComm.FieldByName("business_time2"));
                business_times = Convert.ToInt32(objComm.FieldByName("business_times"));
                brokerage = Convert.ToDouble(objComm.FieldByName("brokerage"));
                exchangefare = Convert.ToDouble(objComm.FieldByName("exchangefare"));
                rebate = Convert.ToDouble(objComm.FieldByName("rebate"));
                rebate_fare0 = Convert.ToDouble(objComm.FieldByName("rebate_fare0"));
                rebate_fare1 = Convert.ToDouble(objComm.FieldByName("rebate_fare1"));
                rebate_fare2 = Convert.ToDouble(objComm.FieldByName("rebate_fare2"));
                rebate_fare3 = Convert.ToDouble(objComm.FieldByName("rebate_fare3"));
                rebate_farex = Convert.ToDouble(objComm.FieldByName("rebate_farex"));
                fare_remark = objComm.FieldByName("fare_remark");
            }
            /// <summary>
            /// 发生日期 
            /// </summary>
            public int date { get; set; }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
            /// <summary>
            /// 业务标志 
            /// </summary>
            public int business_flag { get; set; }
            /// <summary>
            /// 业务名称 
            /// </summary>
            public string business_name { get; set; }
            /// <summary>
            /// 资金发生额 
            /// </summary>
            public double occur_balance { get; set; }
            /// <summary>
            /// 资金本次余额 
            /// </summary>
            public double post_balance { get; set; }
            /// <summary>
            /// 市场类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 市场名称 
            /// </summary>
            public string exchange_name { get; set; }
            /// <summary>
            /// 股东代码 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 股票标识 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 股票名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 发生数量 
            /// </summary>
            public double occur_amount { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 备注 
            /// </summary>
            public string remark { get; set; }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 成交金额 
            /// </summary>
            public double business_balance { get; set; }
            /// <summary>
            /// 佣金 
            /// </summary>
            public double fare0 { get; set; }
            /// <summary>
            /// 印花税 
            /// </summary>
            public double fare1 { get; set; }
            /// <summary>
            /// 过户费 
            /// </summary>
            public double fare2 { get; set; }
            /// <summary>
            /// 通信费 
            /// </summary>
            public double fare3 { get; set; }
            /// <summary>
            /// 其他费用 
            /// </summary>
            public double farex { get; set; }
            /// <summary>
            /// 冻结佣金 
            /// </summary>
            public double std_fare0 { get; set; }
            /// <summary>
            /// 备注2 
            /// </summary>
            public string remark2 { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 委托日期 
            /// </summary>
            public int entrust_date { get; set; }
            /// <summary>
            /// 合同号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 申报号 
            /// </summary>
            public int report_no { get; set; }
            /// <summary>
            /// 申报时间 
            /// </summary>
            public int report_time { get; set; }
            /// <summary>
            /// 成交编号 
            /// </summary>
            public int business_no { get; set; }
            /// <summary>
            /// 成交时间 
            /// </summary>
            public int business_time { get; set; }
            /// <summary>
            /// 成交时间2 
            /// </summary>
            public int business_time2 { get; set; }
            /// <summary>
            /// 成交笔数 
            /// </summary>
            public int business_times { get; set; }
            /// <summary>
            /// 经纪费 
            /// </summary>
            public double brokerage { get; set; }
            /// <summary>
            /// 交易费 
            /// </summary>
            public double exchangefare { get; set; }
            /// <summary>
            /// 分成费用 
            /// </summary>
            public double rebate { get; set; }
            /// <summary>
            /// 折扣佣金 
            /// </summary>
            public double rebate_fare0 { get; set; }
            /// <summary>
            /// 折扣印花税 
            /// </summary>
            public double rebate_fare1 { get; set; }
            /// <summary>
            /// 折扣过户费 
            /// </summary>
            public double rebate_fare2 { get; set; }
            /// <summary>
            /// 折扣费用3 
            /// </summary>
            public double rebate_fare3 { get; set; }
            /// <summary>
            /// 折扣费用x 
            /// </summary>
            public double rebate_farex { get; set; }
            /// <summary>
            /// 费用备注 
            /// </summary>
            public string fare_remark { get; set; }
        }

        ///<summary>
        ///功能号	416	版本号	3.7	更新日期	20090608
        ///功能名称	查询历史资金证券流水详细信息			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询历史资金证券流水详细信息
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	没有资金流水
        ///-61	查询详细历史资金证券流水失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码,必须输入</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="start_date">起始日期</param>
        ///<param name="end_date">结束日期</param>
        ///<param name="money_type">币种类别</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF416> F416查询历史资金证券流水详细信息(int op_branch_no, int branch_no, int fund_account, string password, int start_date, int end_date, string money_type, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 416);
            objComm.SetRange(13, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("money_type");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(money_type);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF416> result = new List<ResultF416>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF416(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F417 查询历史资金流水 的返回结果
        /// </summary>
        public class ResultF417
        {
            public ResultF417(Comm objComm)
            {
                position_str = objComm.FieldByName("position_str");
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
                init_date = Convert.ToInt32(objComm.FieldByName("init_date"));
                business_flag = Convert.ToInt32(objComm.FieldByName("business_flag"));
                business_name = objComm.FieldByName("business_name");
                money_type = objComm.FieldByName("money_type");
                occur_balance = Convert.ToDouble(objComm.FieldByName("occur_balance"));
                post_balance = Convert.ToDouble(objComm.FieldByName("post_balance"));
                remark = objComm.FieldByName("remark");
            }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
            /// <summary>
            /// 发生日期 
            /// </summary>
            public int init_date { get; set; }
            /// <summary>
            /// 业务标志 
            /// </summary>
            public int business_flag { get; set; }
            /// <summary>
            /// 业务标志名称 
            /// </summary>
            public string business_name { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 发生金额，取正负 
            /// </summary>
            public double occur_balance { get; set; }
            /// <summary>
            /// 发生后余额 
            /// </summary>
            public double post_balance { get; set; }
            /// <summary>
            /// 备注 
            /// </summary>
            public string remark { get; set; }
        }

        ///<summary>
        ///功能号	417	版本号	3.7	更新日期	20090608
        ///功能名称	查询历史资金流水			结果集返回	Y
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询历史资金流水
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	没有资金流水
        ///-61	查询流水失败	（其他错误）
        ///修改记录	V3.7 20090608 张国强 增加输入参数query_mode，为'0'和以前一样返回所有历史资金流水，为'1'则不返回期货交易历史资金流水
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="money_type">币种类别</param>
        ///<param name="begin_date">开始日期</param>
        ///<param name="end_date">结束日期</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="query_mode">查询模式，为'0'和以前一样返回所有历史资金流水，为'1'则不返回期货交易历史资金流水</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF417> F417查询历史资金流水(int op_branch_no, int branch_no, int fund_account, string password, string money_type, int begin_date, int end_date, string query_direction, string query_mode, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 417);
            objComm.SetRange(14, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("money_type");
            objComm.AddField("begin_date");
            objComm.AddField("end_date");
            objComm.AddField("query_direction");
            objComm.AddField("query_mode");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(money_type);
            objComm.AddValue(begin_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(query_direction);
            objComm.AddValue(query_mode);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF417> result = new List<ResultF417>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF417(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F418 查询历史转账流水 的返回结果
        /// </summary>
        public class ResultF418
        {
            public ResultF418(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                fund_account = Convert.ToInt32(objComm.FieldByName("fund_account"));
                bank_no = objComm.FieldByName("bank_no");
                bank_name = objComm.FieldByName("bank_name");
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                business_type = objComm.FieldByName("business_type");
                trans_name = objComm.FieldByName("trans_name");
                source_flag = objComm.FieldByName("source_flag");
                money_type = objComm.FieldByName("money_type");
                money_name = objComm.FieldByName("money_name");
                occur_balance = Convert.ToDouble(objComm.FieldByName("occur_balance"));
                entrust_time = Convert.ToInt32(objComm.FieldByName("entrust_time"));
                entrust_status = objComm.FieldByName("entrust_status");
                entrust_name = objComm.FieldByName("entrust_name");
                cancel_info = objComm.FieldByName("cancel_info");
                position_str = objComm.FieldByName("position_str");
            }
            /// <summary>
            /// 营业部号 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 资金帐号 
            /// </summary>
            public int fund_account { get; set; }
            /// <summary>
            /// 银行号码 
            /// </summary>
            public string bank_no { get; set; }
            /// <summary>
            /// 银行名称 
            /// </summary>
            public string bank_name { get; set; }
            /// <summary>
            /// 合同号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 成交类别 
            /// </summary>
            public string business_type { get; set; }
            /// <summary>
            /// 成交类别名称 
            /// </summary>
            public string trans_name { get; set; }
            /// <summary>
            /// 发起方 
            /// </summary>
            public string source_flag { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 币种名称 
            /// </summary>
            public string money_name { get; set; }
            /// <summary>
            /// 资金发生额 
            /// </summary>
            public double occur_balance { get; set; }
            /// <summary>
            /// 委托时间 
            /// </summary>
            public int entrust_time { get; set; }
            /// <summary>
            /// 委托状态 
            /// </summary>
            public string entrust_status { get; set; }
            /// <summary>
            /// 委托状态名称 
            /// </summary>
            public string entrust_name { get; set; }
            /// <summary>
            /// 废单原因 
            /// </summary>
            public string cancel_info { get; set; }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
        }

        ///<summary>
        ///功能号	418	版本号	3.7	更新日期	20090608
        ///功能名称	查询历史转账流水			结果集返回	Y
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询历史转账流水
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	查询历史转账流水失败	（其他错误）
        ///修改记录	V3.7 20090608 冯曙杰 创建，用于支持查询客户历史转账流水
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">柜台资金账号</param>
        ///<param name="bank_password">银行密码（暂时不用）</param>
        ///<param name="action_in">操作确认，0：查询银行流水 1：查询银证通资金</param>
        ///<param name="start_date">起始日期（暂时不用）</param>
        ///<param name="end_date">结束日期（暂时不用）</param>
        ///<param name="bank_no">银行编号</param>
        ///<param name="entrust_no">委托编号（暂时不用）</param>
        ///<param name="query_direction">查询方向（暂时不用）</param>
        ///<param name="request_num">请求数</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF418> F418查询历史转账流水(int op_branch_no, int branch_no, int fund_account, string bank_password, int action_in, int start_date, int end_date, string bank_no, int entrust_no, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 418);
            objComm.SetRange(14, 1);
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("bank_password");
            objComm.AddField("action_in");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("bank_no");
            objComm.AddField("entrust_no");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(bank_password);
            objComm.AddValue(action_in.ToString());
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(bank_no);
            objComm.AddValue(entrust_no.ToString());
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF418> result = new List<ResultF418>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF418(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F427 查询客户资料流水 的返回结果
        /// </summary>
        public class ResultF427
        {
            public ResultF427(Comm objComm)
            {
                date = Convert.ToInt32(objComm.FieldByName("date"));
                time = Convert.ToInt32(objComm.FieldByName("time"));
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
                op_branch_no = Convert.ToInt32(objComm.FieldByName("op_branch_no"));
                operator_no = objComm.FieldByName("operator_no");
                station_no = Convert.ToInt32(objComm.FieldByName("station_no"));
                business_flag = Convert.ToInt32(objComm.FieldByName("business_flag"));
                business_name = objComm.FieldByName("business_name");
                remark = objComm.FieldByName("remark");
                position_str = objComm.FieldByName("position_str");
            }
            /// <summary>
            /// 发生日期 
            /// </summary>
            public int date { get; set; }
            /// <summary>
            /// 发生时间 
            /// </summary>
            public int time { get; set; }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
            /// <summary>
            /// 操作分支号 
            /// </summary>
            public int op_branch_no { get; set; }
            /// <summary>
            /// 操作员号码 
            /// </summary>
            public string operator_no { get; set; }
            /// <summary>
            /// 站点编号 
            /// </summary>
            public int station_no { get; set; }
            /// <summary>
            /// 业务标志 
            /// </summary>
            public int business_flag { get; set; }
            /// <summary>
            /// 业务名称 
            /// </summary>
            public string business_name { get; set; }
            /// <summary>
            /// 备注 
            /// </summary>
            public string remark { get; set; }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
        }

        ///<summary>
        ///功能号	427	版本号	3.7	更新日期	20090608
        ///功能名称	查询客户资料流水			结果集返回	Y
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询资料流水
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	无此帐户
        ///-60	无对应流水
        ///-61	取客户资料流水失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="start_date">起始日期</param>
        ///<param name="end_date">结束日期</param>
        ///<param name="business_flag">业务标志，字符串，可并列多项，用‘|’隔开，空表示所有业务，历史问题该字段为字符串</param>
        ///<param name="query_direction">查询方向</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串</param>
        public List<ResultF427> F427查询客户资料流水(int op_branch_no, int branch_no, int fund_account, string password, int start_date, int end_date, string business_flag, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 427);
            objComm.SetRange(13, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("business_flag");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(business_flag);
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF427> result = new List<ResultF427>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF427(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F451 查询委托号码 的返回结果
        /// </summary>
        public class ResultF451
        {
            public ResultF451(Comm objComm)
            {
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                exchange_type = objComm.FieldByName("exchange_type");
                stock_account = objComm.FieldByName("stock_account");
                stock_code = objComm.FieldByName("stock_code");
                stock_name = objComm.FieldByName("stock_name");
                entrust_bs = objComm.FieldByName("entrust_bs");
                bs_name = objComm.FieldByName("bs_name");
                entrust_price = Convert.ToDouble(objComm.FieldByName("entrust_price"));
                entrust_amount = Convert.ToDouble(objComm.FieldByName("entrust_amount"));
                business_amount = Convert.ToDouble(objComm.FieldByName("business_amount"));
                business_price = Convert.ToDouble(objComm.FieldByName("business_price"));
                report_time = Convert.ToInt32(objComm.FieldByName("report_time"));
                entrust_type = objComm.FieldByName("entrust_type");
                type_name = objComm.FieldByName("type_name");
                entrust_status = objComm.FieldByName("entrust_status");
                status_name = objComm.FieldByName("status_name");
                cancel_info = objComm.FieldByName("cancel_info");
            }
            /// <summary>
            /// 合同号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 交易类别 
            /// </summary>
            public string exchange_type { get; set; }
            /// <summary>
            /// 股东代码 
            /// </summary>
            public string stock_account { get; set; }
            /// <summary>
            /// 股票标识 
            /// </summary>
            public string stock_code { get; set; }
            /// <summary>
            /// 股票名称 
            /// </summary>
            public string stock_name { get; set; }
            /// <summary>
            /// 买卖方向 
            /// </summary>
            public string entrust_bs { get; set; }
            /// <summary>
            /// 买卖方向名称 
            /// </summary>
            public string bs_name { get; set; }
            /// <summary>
            /// 委托价格 
            /// </summary>
            public double entrust_price { get; set; }
            /// <summary>
            /// 委托数量 
            /// </summary>
            public double entrust_amount { get; set; }
            /// <summary>
            /// 成交数量 
            /// </summary>
            public double business_amount { get; set; }
            /// <summary>
            /// 成交价格 
            /// </summary>
            public double business_price { get; set; }
            /// <summary>
            /// 申报时间 
            /// </summary>
            public int report_time { get; set; }
            /// <summary>
            /// 委托类别，0 买卖，1 查询，2 撤单，3 补单 
            /// </summary>
            public string entrust_type { get; set; }
            /// <summary>
            /// 委托类别名称 
            /// </summary>
            public string type_name { get; set; }
            /// <summary>
            /// 委托状态 
            /// </summary>
            public string entrust_status { get; set; }
            /// <summary>
            /// 状态名称 
            /// </summary>
            public string status_name { get; set; }
            /// <summary>
            /// 废单原因 
            /// </summary>
            public string cancel_info { get; set; }
        }

        ///<summary>
        ///功能号	451	版本号	3.7	更新日期	20090608
        ///功能名称	查询委托号码			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询委托号码
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-60	没有委托记录
        ///-61	查询委托号码失败
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="exchange_type">交易类别</param>
        ///<param name="seat_no">席位编号</param>
        ///<param name="report_no">申请编号，不为0，查该笔委托</param>
        ///<param name="entrust_type">委托类别</param>
        public List<ResultF451> F451查询委托号码(int op_branch_no, int branch_no, int fund_account, string password, string exchange_type, string seat_no, int report_no, string entrust_type)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 451);
            objComm.SetRange(11, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("exchange_type");
            objComm.AddField("seat_no");
            objComm.AddField("report_no");
            objComm.AddField("entrust_type");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(exchange_type);
            objComm.AddValue(seat_no);
            objComm.AddValue(report_no.ToString());
            objComm.AddValue(entrust_type);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF451> result = new List<ResultF451>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF451(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F452 查询银行帐号 的返回结果
        /// </summary>
        public class ResultF452
        {
            public ResultF452(Comm objComm)
            {
                money_type = objComm.FieldByName("money_type");
                bank_no = objComm.FieldByName("bank_no");
                bank_name = objComm.FieldByName("bank_name");
                bank_account = objComm.FieldByName("bank_account");
                bkaccount_status = objComm.FieldByName("bkaccount_status");
                bkaccount_rights = objComm.FieldByName("bkaccount_rights");
                bkaccount_regflag = objComm.FieldByName("bkaccount_regflag");
            }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 银行代码 
            /// </summary>
            public string bank_no { get; set; }
            /// <summary>
            /// 银行名称 
            /// </summary>
            public string bank_name { get; set; }
            /// <summary>
            /// 银行帐号 
            /// </summary>
            public string bank_account { get; set; }
            /// <summary>
            /// 银行帐号状态 
            /// </summary>
            public string bkaccount_status { get; set; }
            /// <summary>
            /// 银行帐号权限 
            /// </summary>
            public string bkaccount_rights { get; set; }
            /// <summary>
            /// 银行帐号存管指定标记 
            /// </summary>
            public string bkaccount_regflag { get; set; }
        }

        ///<summary>
        ///功能号	452	版本号	3.7	更新日期	20090608
        ///功能名称	查询银行帐号			结果集返回	Y
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询银行帐号
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	查询银行帐号失败
        ///修改记录	V3.7 20090608 张国强 增加输出参数bkaccount_regflag，支持银行存管指定标记的返回
        ///V3.7 20071114 张国强 增加输出参数bkaccount_status, bkaccount_rights，支持银行状态、银行权限等信息的返回
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="money_type">币种类别,空串表示全部。</param>
        ///<param name="bank_no">银行代码,空串表示全部。</param>
        public List<ResultF452> F452查询银行帐号(int op_branch_no, int branch_no, int fund_account, string password, string money_type, string bank_no)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 452);
            objComm.SetRange(9, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("money_type");
            objComm.AddField("bank_no");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(money_type);
            objComm.AddValue(bank_no);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF452> result = new List<ResultF452>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF452(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F457 查询客户开通委托方式 的返回结果
        /// </summary>
        public class ResultF457
        {
            public ResultF457(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                entrust_way = objComm.FieldByName("entrust_way");
                way_name = objComm.FieldByName("way_name");
            }
            /// <summary>
            /// 分支代码 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 委托方式 
            /// </summary>
            public string entrust_way { get; set; }
            /// <summary>
            /// 委托方式名称 
            /// </summary>
            public string way_name { get; set; }
        }

        ///<summary>
        ///功能号	457	版本号	3.7	更新日期	20090608
        ///功能名称	查询客户开通委托方式			结果集返回	N
        ///业务范围	公用			功能状态	公开
        ///功能描述	查询客户开通委托方式
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-61	查询银行帐号失败
        ///修改记录	V3.7 20090608 冯曙杰 创建，用于支持查询客户已开通委托方式
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="fund_account">柜台资金账号</param>
        ///<param name="password">交易密码</param>
        public ResultF457 F457查询客户开通委托方式(int op_branch_no, int fund_account, string password)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 457);
            objComm.SetRange(6, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF457 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF457(objComm);
            }
            return result;

        }

        /// <summary>
        /// F500 周边银行转帐 的返回结果
        /// </summary>
        public class ResultF500
        {
            public ResultF500(Comm objComm)
            {
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
            }
            /// <summary>
            /// 委托编号 
            /// </summary>
            public int entrust_no { get; set; }
        }

        ///<summary>
        ///功能号	500	版本号	3.7	更新日期	20090608
        ///功能名称	周边银行转帐			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	周边银行转帐
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	未开通此银行转帐业务	（包含银行号输入错误）
        ///-57	证券帐户可取金额不足	（包含转帐后可取金额低于下限）
        ///-62	累计转帐金额超出限制
        ///-63	取款密码错误
        ///-61	周边银行转帐失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">资金密码</param>
        ///<param name="fund_password">资金密码</param>
        ///<param name="bank_password">银行密码</param>
        ///<param name="money_type">币种类别</param>
        ///<param name="bank_no">银行代码</param>
        ///<param name="transfer_direction">交易方向 '1' – 银行转证券  '2' -- 证券转银行</param>
        ///<param name="occur_balance">发生金额</param>
        public ResultF500 F500周边银行转帐(int op_branch_no, int branch_no, int fund_account, string password, string fund_password, string bank_password, string money_type, string bank_no, string transfer_direction, double occur_balance)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 500);
            objComm.SetRange(13, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("fund_password");
            objComm.AddField("bank_password");
            objComm.AddField("money_type");
            objComm.AddField("bank_no");
            objComm.AddField("transfer_direction");
            objComm.AddField("occur_balance");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(fund_password);
            objComm.AddValue(bank_password);
            objComm.AddValue(money_type);
            objComm.AddValue(bank_no);
            objComm.AddValue(transfer_direction);
            objComm.AddValue(occur_balance.ToString());
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF500 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF500(objComm);
            }
            return result;

        }

        /// <summary>
        /// F501 查询银行转账流水 的返回结果
        /// </summary>
        public class ResultF501
        {
            public ResultF501(Comm objComm)
            {
                branch_no = Convert.ToInt32(objComm.FieldByName("branch_no"));
                fund_account = Convert.ToInt32(objComm.FieldByName("fund_account"));
                bank_no = objComm.FieldByName("bank_no");
                bank_name = objComm.FieldByName("bank_name");
                entrust_no = Convert.ToInt32(objComm.FieldByName("entrust_no"));
                business_type = objComm.FieldByName("business_type");
                trans_name = objComm.FieldByName("trans_name");
                source_flag = objComm.FieldByName("source_flag");
                money_type = objComm.FieldByName("money_type");
                money_name = objComm.FieldByName("money_name");
                occur_balance = Convert.ToDouble(objComm.FieldByName("occur_balance"));
                entrust_time = Convert.ToInt32(objComm.FieldByName("entrust_time"));
                entrust_status = objComm.FieldByName("entrust_status");
                entrust_name = objComm.FieldByName("entrust_name");
                cancel_info = objComm.FieldByName("cancel_info");
                bank_error_info = Convert.ToInt32(objComm.FieldByName("bank_error_info"));
                position_str = objComm.FieldByName("position_str");
            }
            /// <summary>
            /// 营业部号 
            /// </summary>
            public int branch_no { get; set; }
            /// <summary>
            /// 资金帐号 
            /// </summary>
            public int fund_account { get; set; }
            /// <summary>
            /// 银行号码 
            /// </summary>
            public string bank_no { get; set; }
            /// <summary>
            /// 银行名称 
            /// </summary>
            public string bank_name { get; set; }
            /// <summary>
            /// 合同号 
            /// </summary>
            public int entrust_no { get; set; }
            /// <summary>
            /// 成交类别 
            /// </summary>
            public string business_type { get; set; }
            /// <summary>
            /// 成交类别名称 
            /// </summary>
            public string trans_name { get; set; }
            /// <summary>
            /// 发起方 
            /// </summary>
            public string source_flag { get; set; }
            /// <summary>
            /// 币种类别 
            /// </summary>
            public string money_type { get; set; }
            /// <summary>
            /// 币种名称 
            /// </summary>
            public string money_name { get; set; }
            /// <summary>
            /// 资金发生额 
            /// </summary>
            public double occur_balance { get; set; }
            /// <summary>
            /// 委托时间 
            /// </summary>
            public int entrust_time { get; set; }
            /// <summary>
            /// 委托状态 
            /// </summary>
            public string entrust_status { get; set; }
            /// <summary>
            /// 委托状态名称 
            /// </summary>
            public string entrust_name { get; set; }
            /// <summary>
            /// 废单原因 
            /// </summary>
            public string cancel_info { get; set; }
            /// <summary>
            /// 银行错误详细信息 
            /// </summary>
            public int bank_error_info { get; set; }
            /// <summary>
            /// 定位串 
            /// </summary>
            public string position_str { get; set; }
        }

        ///<summary>
        ///功能号	501	版本号	3.7	更新日期	20090608
        ///功能名称	查询银行转账流水			结果集返回	Y
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询银行转账流水
        ///业务说明
        ///entrust_status说明如下
        ///值     说明      备注
        ///0      未报
        ///1      已报
        ///2      成功
        ///3      作废
        ///4      待撤
        ///5      撤销
        ///7      待冲正
        ///8      已冲正
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	未开通此银行转帐业务	（包含银行号输入错误，此错误可不作判断）
        ///-53	无此流水号	（包含此流水不是该股民的）
        ///-60	没有银行转帐流水
        ///-61	查转账流水失败	（其他错误）
        ///修改记录	V3.7 20090608 张国强 增加输出参数bank_error_info，支持银行错误详细信息的返回
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">资金密码</param>
        ///<param name="bank_password">银行密码（暂时不用）</param>
        ///<param name="start_date">起始日期（暂时不用）</param>
        ///<param name="end_date">结束日期（暂时不用）</param>
        ///<param name="bank_no">银行代码（暂时不用）</param>
        ///<param name="entrust_no">委托号（暂时不用）</param>
        ///<param name="query_direction">查询方向（暂时不用）</param>
        ///<param name="request_num">请求行数，不送按50行处理，超过系统指定值（1000行）按系统指定值（1000行）处理</param>
        ///<param name="position_str">定位串小于8位，认为传入的是流水号，第一次查询要求送空或者0</param>
        public List<ResultF501> F501查询银行转账流水(int op_branch_no, int branch_no, int fund_account, string password, string bank_password, int start_date, int end_date, string bank_no, int entrust_no, string query_direction, int request_num, string position_str)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 501);
            objComm.SetRange(15, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_entrust_way");
            objComm.AddField("op_station");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("bank_password");
            objComm.AddField("start_date");
            objComm.AddField("end_date");
            objComm.AddField("bank_no");
            objComm.AddField("entrust_no");
            objComm.AddField("query_direction");
            objComm.AddField("request_num");
            objComm.AddField("position_str");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(op_station);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(bank_password);
            objComm.AddValue(start_date.ToString());
            objComm.AddValue(end_date.ToString());
            objComm.AddValue(bank_no);
            objComm.AddValue(entrust_no.ToString());
            objComm.AddValue(query_direction);
            objComm.AddValue(request_num.ToString());
            objComm.AddValue(position_str);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            List<ResultF501> result = new List<ResultF501>();
            while (objComm.Eof == 0)
            {
                result.Add(new ResultF501(objComm));
                objComm.MoveBy(1);
            }
            return result;

        }

        /// <summary>
        /// F502 查询银行帐户余额 的返回结果
        /// </summary>
        public class ResultF502
        {
            public ResultF502(Comm objComm)
            {
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
            }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
        }

        ///<summary>
        ///功能号	502	版本号	3.7	更新日期	20090608
        ///功能名称	查询银行帐户余额			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	查询银行帐户余额（证券发起）
        ///业务说明
        ///当客户端发出该请求后，服务端将只是返回该笔请求的请求号码serial_no，此时客户端必须通过此委托号发送查询银行转帐委托成交流水（功能号501）进行轮询，以检查该笔请求是否成功（entrust_status＝2），成功则occur_balance的值为银行余额，如果（entrust_status＝3），则查询失败，客户端必须重新发出请求。
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	未开通此银行转帐业务	（包含银行号输入错误，此错误可不作判断）
        ///-61	查银行余额失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="fund_password">资金密码（暂不使用）</param>
        ///<param name="bank_password">客户银行密码</param>
        ///<param name="bank_no">银行代码</param>
        ///<param name="money_type">币种类别</param>
        public ResultF502 F502查询银行帐户余额(int op_branch_no, int branch_no, int fund_account, string password, string fund_password, string bank_password, string bank_no, string money_type)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 502);
            objComm.SetRange(11, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_station");
            objComm.AddField("op_entrust_way");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("fund_password");
            objComm.AddField("bank_password");
            objComm.AddField("bank_no");
            objComm.AddField("money_type");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_station);
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(fund_password);
            objComm.AddValue(bank_password);
            objComm.AddValue(bank_no);
            objComm.AddValue(money_type);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF502 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF502(objComm);
            }
            return result;

        }

        /// <summary>
        /// F503 更改银行转帐密码 的返回结果
        /// </summary>
        public class ResultF503
        {
            public ResultF503(Comm objComm)
            {
                serial_no = Convert.ToInt32(objComm.FieldByName("serial_no"));
            }
            /// <summary>
            /// 流水号 
            /// </summary>
            public int serial_no { get; set; }
        }

        ///<summary>
        ///功能号	503	版本号	3.7	更新日期	20090608
        ///功能名称	更改银行转帐密码			结果集返回	N
        ///业务范围	证券			功能状态	公开
        ///功能描述	更改银行转帐密码
        ///业务说明
        ///出错说明	错误号	错误信息	错误说明	错误级别
        ///-51	未开通此银行转帐业务	（包含银行号输入错误，此错误可不作判断）
        ///-61	更改密码失败	（其他错误）
        ///修改记录
        ///</summary>
        ///<param name="op_branch_no">操作员分支代码</param>
        ///<param name="branch_no">分支代码</param>
        ///<param name="fund_account">资金账号</param>
        ///<param name="password">交易密码</param>
        ///<param name="bank_no">银行代码</param>
        ///<param name="new_password">新密码</param>
        ///<param name="bank_password">客户银行密码</param>
        public ResultF503 F503更改银行转帐密码(int op_branch_no, int branch_no, int fund_account, string password, string bank_no, string new_password, string bank_password)
        {
            if (this.objNet == null)
                throw new WebException("网络已断开，请重新连接");
            objComm.SetHead(branch_no, 503);
            objComm.SetRange(10, 1);
            objComm.AddField("version");
            objComm.AddField("op_branch_no");
            objComm.AddField("op_station");
            objComm.AddField("op_entrust_way");
            objComm.AddField("branch_no");
            objComm.AddField("fund_account");
            objComm.AddField("password");
            objComm.AddField("bank_no");
            objComm.AddField("new_password");
            objComm.AddField("bank_password");
            objComm.AddValue(version.ToString());
            objComm.AddValue(op_branch_no.ToString());
            objComm.AddValue(op_station);
            objComm.AddValue(op_entrust_way);
            objComm.AddValue(branch_no.ToString());
            objComm.AddValue(fund_account.ToString());
            objComm.AddValue(password);
            objComm.AddValue(bank_no);
            objComm.AddValue(new_password);
            objComm.AddValue(bank_password);
            if (objComm.Send() != 0)
                throw new WebException("指令发送失败");
            objComm.FreePack();
            if (objComm.Receive() != 0)
                throw new WebException("指令接收失败");
            if (objComm.ErrorNo != 0)
                throw new HsCommException(objComm.ErrorMsg, objComm.ErrorNo);
            ResultF503 result = null;
            if (objComm.Eof == 0)
            {
                result = new ResultF503(objComm);
            }
            return result;

        }

        #endregion

        #region Enmus

        public enum money_type : uint
        {
            人民币,
            美圆,
            港币
        }


        #endregion
    }
}
